[ray] specify ray storage path (#6920)

Former-commit-id: 6edd4992d700fec56800a638f1cac0f87990c581
This commit is contained in:
Eric Tang 2025-02-14 05:55:41 -08:00 committed by GitHub
parent 2baf8bf03d
commit e55ec42d3c
2 changed files with 6 additions and 2 deletions

View File

@ -16,7 +16,11 @@ class RayArguments:
ray_run_name: Optional[str] = field(
default=None,
metadata={"help": "The training results will be saved at `saves/ray_run_name`."},
metadata={"help": "The training results will be saved at `<ray_storage_path>/ray_run_name`."},
)
ray_storage_path: str = field(
default="./saves",
metadata={"help": "The storage path to save training results to"},
)
ray_num_workers: int = field(
default=1,

View File

@ -621,7 +621,7 @@ def get_ray_trainer(
),
run_config=RunConfig(
name=ray_args.ray_run_name,
storage_path=Path("./saves").absolute().as_posix(),
storage_path=Path(ray_args.ray_storage_path).absolute().as_posix(),
),
)
return trainer