MCPcopy
hub / github.com/THUDM/CogDL / note

Method note

cogdl/wrappers/model_wrapper/base_model_wrapper.py:91–101  ·  view source on GitHub ↗

name: str data: Any

(self, name: str, data, merge="mean")

Source from the content-addressed store, hash-verified

89 self.note(f"{prefix}_{i}", val)
90
91 def note(self, name: str, data, merge="mean"):
92 """
93 name: str
94 data: Any
95 """
96 if name not in self.__record__:
97 name = name.lower()
98 self.__record__[name] = [data]
99 # self.__record_merge__[name] = merge
100 else:
101 self.__record__[name].append(data)
102
103 def collect_notes(self):
104 if len(self.__record__) == 0:

Callers 15

set_notesMethod · 0.95
val_stepMethod · 0.45
test_stepMethod · 0.45
val_stepMethod · 0.45
test_stepMethod · 0.45
val_stepMethod · 0.45
test_stepMethod · 0.45
val_stepMethod · 0.45
test_stepMethod · 0.45
val_stepMethod · 0.45
test_stepMethod · 0.45
val_stepMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36
test_stepMethod · 0.36