Skip to content

Commit

Permalink
replace raise in accelerate.launch
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianlim committed May 1, 2024
1 parent 3b1948f commit 0bdf019
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/accelerate/utils/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ def prepare_multi_gpu_env(args: argparse.Namespace) -> Dict[str, str]:

if args.use_fsdp:
current_env["ACCELERATE_USE_FSDP"] = "true"
if args.fsdp_cpu_ram_efficient_loading and not args.fsdp_sync_module_states:
raise ValueError("When using `--fsdp_cpu_ram_efficient_loading` set `--fsdp_sync_module_states` to `True`")

current_env["FSDP_SHARDING_STRATEGY"] = str(args.fsdp_sharding_strategy)
current_env["FSDP_OFFLOAD_PARAMS"] = str(args.fsdp_offload_params).lower()
Expand Down

0 comments on commit 0bdf019

Please sign in to comment.