Skip to content

Commit

Permalink
Actually reverse states
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerzr committed Oct 10, 2024
1 parent 8499302 commit 49e6556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/accelerate/checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def load_accelerator_state(

# Random states
try:
states = load(input_dir.joinpath(f"{RNG_STATE_NAME}_{process_index}.pkl"), weights_only=False)
states = load(input_dir.joinpath(f"{RNG_STATE_NAME}_{process_index}.pkl"), weights_only=True)
if "step" in states:
override_attributes["step"] = states["step"]
random.setstate(states["random_state"])
Expand Down

0 comments on commit 49e6556

Please sign in to comment.