MCPcopy Create free account
hub / github.com/bic-L/MaxFormer / __getattr__

Method __getattr__

event/utils.py:85–91  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

83 self.meters[k].update(v)
84
85 def __getattr__(self, attr):
86 if attr in self.meters:
87 return self.meters[attr]
88 if attr in self.__dict__:
89 return self.__dict__[attr]
90 raise AttributeError("'{}' object has no attribute '{}'".format(
91 type(self).__name__, attr))
92
93 def __str__(self):
94 loss_str = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected