MCPcopy Create free account
hub / github.com/GasaiYU/PartRM / get_obj_from_str

Function get_obj_from_str

preprocess/src/utils/train_util.py:21–26  ·  view source on GitHub ↗
(string, reload=False)

Source from the content-addressed store, hash-verified

19
20
21def get_obj_from_str(string, reload=False):
22 module, cls = string.rsplit(".", 1)
23 if reload:
24 module_imp = importlib.import_module(module)
25 importlib.reload(module_imp)
26 return getattr(importlib.import_module(module, package=None), cls)

Callers 1

instantiate_from_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected