MCPcopy Index your code
hub / github.com/modelscope/modelscope / check_attr

Function check_attr

modelscope/utils/config.py:705–707  ·  view source on GitHub ↗
(attr_name, msg='')

Source from the content-addressed store, hash-verified

703 cfg = Config.from_file(cfg)
704
705 def check_attr(attr_name, msg=''):
706 assert hasattr(cfg, attr_name), f'Attribute {attr_name} is missing from ' \
707 f'{ModelFile.CONFIGURATION}. {msg}'
708
709 check_attr(ConfigFields.framework)
710 check_attr(ConfigFields.task)

Callers 1

check_configFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…