MCPcopy Create free account
hub / github.com/TencentARC/MotionCtrl / get_obj_from_str

Function get_obj_from_str

utils/utils.py:40–45  ·  view source on GitHub ↗
(string, reload=False)

Source from the content-addressed store, hash-verified

38
39
40def get_obj_from_str(string, reload=False):
41 module, cls = string.rsplit(".", 1)
42 if reload:
43 module_imp = importlib.import_module(module)
44 importlib.reload(module_imp)
45 return getattr(importlib.import_module(module, package=None), cls)
46
47
48def load_npz_from_dir(data_dir):

Callers 1

instantiate_from_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected