[misc] fix cli (#8095)

Co-authored-by: wangbiao11 <wangbiao11@baidu.com>
This commit is contained in:
Biao Wang 2025-05-19 17:59:39 +08:00 committed by GitHub
parent 820ed764c4
commit 89a0d10c18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,7 @@ def main():
"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())):
# launch distributed training
nnodes = os.getenv("NNODES", "1")