[misc] fix cli (#7204)

Former-commit-id: 999f57133ca163c7108d2d5ee8194eca9b2109b4
This commit is contained in:
hoshi-hiyouga
2025-03-07 15:01:18 +08:00
committed by GitHub
parent f4ec4fa6ad
commit a255c3a476
5 changed files with 188 additions and 162 deletions

View File

@@ -86,6 +86,9 @@ def _training_function(config: Dict[str, Any]) -> None:
def run_exp(args: Optional[Dict[str, Any]] = None, callbacks: Optional[List["TrainerCallback"]] = None) -> None:
args = read_args(args)
if "-h" in args or "--help" in args:
get_train_args(args)
ray_args = get_ray_args(args)
callbacks = callbacks or []
if ray_args.use_ray: