Skip to content

Commit

Permalink
Removing hard coded name
Browse files Browse the repository at this point in the history
  • Loading branch information
bcui19 committed Jan 6, 2024
1 parent d5ad317 commit cf6d9e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer/utils/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ def read_data(self, plan: LoadPlan, planner: LoadPlanner):
log.debug('Strip _pgidx from optimizer state dict keys')
local_idx = f'_pgidx{dist.get_local_rank()}'
log.debug('Get ptr to optimizer state dict')
optim_state_dict = optim_state['optimizers']['DecoupledLionW']['state']
optim_name = list(optim_state['optimizers'].keys())[0]
optim_state_dict = optim_state['optimizers'][optim_name]['state']
log.debug('Loop over optimizer state dict keys')
for key in list(optim_state_dict.keys()):
log.debug(f'Stripping {local_idx} from {key=}')
Expand Down

0 comments on commit cf6d9e9

Please sign in to comment.