MCPcopy Create free account
hub / github.com/InternScience/InternAgent / __call__

Method __call__

tasks/AutoMolecule3D/code/visnet/utils.py:73–82  ·  view source on GitHub ↗
(self, parser, namespace, values, option_string=None)

Source from the content-addressed store, hash-verified

71
72class LoadFromFile(argparse.Action):
73 def __call__(self, parser, namespace, values, option_string=None):
74 if values.name.endswith("yaml") or values.name.endswith("yml"):
75 with values as f:
76 config = yaml.load(f, Loader=yaml.FullLoader)
77 for key in config.keys():
78 if key not in namespace:
79 raise ValueError(f"Unknown argument in config file: {key}")
80 namespace.__dict__.update(config)
81 else:
82 raise ValueError("Configuration file must end with yaml or yml")
83
84
85class LoadFromCheckpoint(argparse.Action):

Callers

nothing calls this directly

Calls 2

loadMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected