MCPcopy Create free account
hub / github.com/modelscope/modelscope / __setstate__

Method __setstate__

modelscope/utils/config.py:375–379  ·  view source on GitHub ↗
(self, state)

Source from the content-addressed store, hash-verified

373 return other
374
375 def __setstate__(self, state):
376 _cfg_dict, _filename, _text = state
377 super(Config, self).__setattr__('_cfg_dict', _cfg_dict)
378 super(Config, self).__setattr__('_filename', _filename)
379 super(Config, self).__setattr__('_text', _text)
380
381 def safe_get(self, key_chain: str, default=None, type_field='type'):
382 """Get a value with a key-chain in str format, if key does not exist, the default value will be returned.

Callers

nothing calls this directly

Calls 1

__setattr__Method · 0.45

Tested by

no test coverage detected