Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
helloworld1 committed Apr 19, 2024
1 parent 579a036 commit 73d8e4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,9 @@ def __post_init__(self):
if str(sync_module_states).lower() == "false" and str(cpu_ram_efficient_loading).lower() == "true":
# In this case, all the processes except the main process would have random weights leading
# to unexpected behaviour during training, thus throwing error here to prevent it.
raise ValueError("`sync_module_states` must be `\"True\"` if `cpu_ram_efficient_loading` is `\"True\"`")
raise ValueError(
"`sync_module_states` must be `\"True\"` if `cpu_ram_efficient_loading` is `\"True\"`"
)

os.environ[f"{prefix}SYNC_MODULE_STATES"] = sync_module_states
os.environ[f"{prefix}CPU_RAM_EFFICIENT_LOADING"] = cpu_ram_efficient_loading
Expand Down

0 comments on commit 73d8e4a

Please sign in to comment.