mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-03 04:02:49 +08:00
[misc] fix cli (#8095)
Co-authored-by: wangbiao11 <wangbiao11@baidu.com>
This commit is contained in:
parent
820ed764c4
commit
89a0d10c18
@ -73,7 +73,7 @@ def main():
|
|||||||
"help": partial(print, USAGE),
|
"help": partial(print, USAGE),
|
||||||
}
|
}
|
||||||
|
|
||||||
command = sys.argv.pop(1) if len(sys.argv) >= 1 else "help"
|
command = sys.argv.pop(1) if len(sys.argv) > 1 else "help"
|
||||||
if command == "train" and (is_env_enabled("FORCE_TORCHRUN") or (get_device_count() > 1 and not use_ray())):
|
if command == "train" and (is_env_enabled("FORCE_TORCHRUN") or (get_device_count() > 1 and not use_ray())):
|
||||||
# launch distributed training
|
# launch distributed training
|
||||||
nnodes = os.getenv("NNODES", "1")
|
nnodes = os.getenv("NNODES", "1")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user