MCPcopy Index your code
hub / github.com/CompVis/diff2flow / instantiate_from_config

Function instantiate_from_config

diff2flow/helpers.py:20–23  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

18
19
20def instantiate_from_config(config):
21 if "target" not in config:
22 raise KeyError("Expected key `target` to instantiate.")
23 return get_obj_from_str(config["target"])(**config.get("params", dict()))
24
25
26def load_partial_from_config(config):

Callers 8

mainFunction · 0.90
__init__Method · 0.90
make_loaderMethod · 0.90
prepare_dataMethod · 0.90
setupMethod · 0.90
__init__Method · 0.90
__init__Method · 0.90
load_model_from_configFunction · 0.85

Calls 1

get_obj_from_strFunction · 0.85

Tested by

no test coverage detected