MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / _compare

Function _compare

DeepSpeedExample/megatron/checkpointing.py:47–53  ·  view source on GitHub ↗
(arg_name)

Source from the content-addressed store, hash-verified

45 args = get_args()
46
47 def _compare(arg_name):
48 checkpoint_value = getattr(checkpoint_args, arg_name)
49 args_value = getattr(args, arg_name)
50 error_message = '{} value from checkpoint ({}) is not equal to the ' \
51 'input argument value ({}).'.format(
52 arg_name, checkpoint_value, args_value)
53 assert checkpoint_value == args_value, error_message
54
55 _compare('num_layers')
56 _compare('hidden_size')

Callers 1

check_checkpoint_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected