[v1] add v1 launcher (#9236)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
|
||||
VERSION = "0.9.4.dev0"
|
||||
|
||||
|
||||
@@ -28,20 +31,20 @@ def print_env() -> None:
|
||||
import peft
|
||||
import torch
|
||||
import transformers
|
||||
import trl
|
||||
from transformers.utils import is_torch_cuda_available, is_torch_npu_available
|
||||
|
||||
info = {
|
||||
"`llamafactory` version": VERSION,
|
||||
"Platform": platform.platform(),
|
||||
"Python version": platform.python_version(),
|
||||
"PyTorch version": torch.__version__,
|
||||
"Transformers version": transformers.__version__,
|
||||
"Datasets version": datasets.__version__,
|
||||
"Accelerate version": accelerate.__version__,
|
||||
"PEFT version": peft.__version__,
|
||||
"TRL version": trl.__version__,
|
||||
}
|
||||
info = OrderedDict(
|
||||
{
|
||||
"`llamafactory` version": VERSION,
|
||||
"Platform": platform.platform(),
|
||||
"Python version": platform.python_version(),
|
||||
"PyTorch version": torch.__version__,
|
||||
"Transformers version": transformers.__version__,
|
||||
"Datasets version": datasets.__version__,
|
||||
"Accelerate version": accelerate.__version__,
|
||||
"PEFT version": peft.__version__,
|
||||
}
|
||||
)
|
||||
|
||||
if is_torch_cuda_available():
|
||||
info["PyTorch version"] += " (GPU)"
|
||||
@@ -54,6 +57,13 @@ def print_env() -> None:
|
||||
info["NPU type"] = torch.npu.get_device_name()
|
||||
info["CANN version"] = torch.version.cann
|
||||
|
||||
try:
|
||||
import trl # type: ignore
|
||||
|
||||
info["TRL version"] = trl.__version__
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
import deepspeed # type: ignore
|
||||
|
||||
|
||||
Reference in New Issue
Block a user