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

Function load_state_optimizer

PATH/core/utils.py:219–223  ·  view source on GitHub ↗
(optimizer, state, ginfo)

Source from the content-addressed store, hash-verified

217
218
219def load_state_optimizer(optimizer, state, ginfo):
220 if ginfo.task_rank == 0:
221 printlog(f'======= loading optimizer state for task {ginfo.task_id} ... =======')
222
223 optimizer.load_state_dict(state)
224
225def create_logger(name, log_file, level=logging.INFO):
226 l = logging.getLogger(name)

Callers 1

loadMethod · 0.90

Calls 2

printlogFunction · 0.85
load_state_dictMethod · 0.80

Tested by

no test coverage detected