MCPcopy Index your code
hub / github.com/VisionXLab/OF-Diff / get_obj_from_str

Function get_obj_from_str

ldm/util.py:82–87  ·  view source on GitHub ↗
(string, reload=False)

Source from the content-addressed store, hash-verified

80
81
82def get_obj_from_str(string, reload=False):
83 module, cls = string.rsplit(".", 1)
84 if reload:
85 module_imp = importlib.import_module(module)
86 importlib.reload(module_imp)
87 return getattr(importlib.import_module(module, package=None), cls)
88
89
90class AdamWwithEMAandWings(optim.Optimizer):

Callers 1

instantiate_from_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected