MCPcopy Index your code
hub / github.com/modelscope/modelscope / update

Method update

modelscope/utils/metric.py:87–94  ·  view source on GitHub ↗
(self, values=None, **kwargs)

Source from the content-addressed store, hash-verified

85 return {k: v for k, v in self.items() if filter_key in k}
86
87 def update(self, values=None, **kwargs):
88 if values is None:
89 values = {}
90 values.update(kwargs)
91 for k, v in values.items():
92 if isinstance(v, torch.Tensor):
93 v = v.detach()
94 self[k].update(v)
95
96 def clear_meters(self):
97 for v in self.values():

Callers 15

get_pluginFunction · 0.45
init_megatron_utilFunction · 0.45
__copy__Method · 0.45
add_stream_generateFunction · 0.45
wrapperFunction · 0.45
save_checkpointFunction · 0.45
_update_indexFunction · 0.45
get_file_hashFunction · 0.45
_get_file_hash_asyncFunction · 0.45
git_hashFunction · 0.45
compute_checksumFunction · 0.45

Calls 2

detachMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected