MCPcopy
hub / github.com/karpathy/minGPT / to_dict

Method to_dict

mingpt/utils.py:55–57  ·  view source on GitHub ↗

return a dict representation of the config

(self)

Source from the content-addressed store, hash-verified

53 return "".join(parts)
54
55 def to_dict(self):
56 """ return a dict representation of the config """
57 return { k: v.to_dict() if isinstance(v, CfgNode) else v for k, v in self.__dict__.items() }
58
59 def merge_from_dict(self, d):
60 self.__dict__.update(d)

Callers 1

setup_loggingFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected