MCPcopy Create free account
hub / github.com/csuhan/OneLLM / __getattr__

Method __getattr__

util/misc.py:115–121  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

113 self.meters[k].update(v)
114
115 def __getattr__(self, attr):
116 if attr in self.meters:
117 return self.meters[attr]
118 if attr in self.__dict__:
119 return self.__dict__[attr]
120 raise AttributeError("'{}' object has no attribute '{}'".format(
121 type(self).__name__, attr))
122
123 def __str__(self):
124 loss_str = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected