MCPcopy Create free account
hub / github.com/SooLab/CGFormer / to_dict

Method to_dict

bert/configuration_utils.py:357–367  ·  view source on GitHub ↗

Serializes this instance to a Python dictionary. Returns: :obj:`Dict[str, any]`: Dictionary of all the attributes that make up this configuration instance,

(self)

Source from the content-addressed store, hash-verified

355 return serializable_config_dict
356
357 def to_dict(self):
358 """
359 Serializes this instance to a Python dictionary.
360
361 Returns:
362 :obj:`Dict[str, any]`: Dictionary of all the attributes that make up this configuration instance,
363 """
364 output = copy.deepcopy(self.__dict__)
365 if hasattr(self.__class__, "model_type"):
366 output["model_type"] = self.__class__.model_type
367 return output
368
369 def to_json_string(self, use_diff=True):
370 """

Callers 2

to_diff_dictMethod · 0.95
to_json_stringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected