Skip to content

Commit

Permalink
rename reference state dicts (#838)
Browse files Browse the repository at this point in the history
## Description

Use clearer variable names for reference state dicts in the checkpoint
test.

## Checklist:

- [x] Have you added tests that prove your fix is effective or that this
feature works?
- [x] Has code been commented, particularly in hard-to-understand areas?

Co-authored-by: Eddy <ogolaedd@meta.com>
  • Loading branch information
eddogola and eddogola authored Jul 12, 2023
1 parent 11b2c49 commit bf63a64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/local_test_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def run_worker(args: List[str | int]) -> None:

# Take an optimization step
optimizer.step()
submod_ref = deepcopy(stage.submod.state_dict())
optim_ref = deepcopy(optimizer.state_dict())
ref_state_dict = deepcopy(stage.submod.state_dict())
ref_optim_state_dict = deepcopy(optimizer.state_dict())
save_checkpoint(stage, CKPT_DIR, optimizer)

# save index file in rank 0
Expand Down

0 comments on commit bf63a64

Please sign in to comment.