MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / copy_optim_state_dict_cpu_fp16

Function copy_optim_state_dict_cpu_fp16

PATH/core/utils.py:683–689  ·  view source on GitHub ↗
(state_dict)

Source from the content-addressed store, hash-verified

681 return new_state
682
683def copy_optim_state_dict_cpu_fp16(state_dict):
684 new_state = {}
685 new_state['optimizer_state_dict'] = copy_optim_state_dict_cpu(state_dict['optimizer_state_dict'])
686 for k in state_dict.keys():
687 if k != 'optimizer_state_dict':
688 new_state[k] = copy.deepcopy(state_dict[k])
689 return new_state
690
691def sync_print(*args, **kwargs):
692 rank = dist.get_rank()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected