MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / get_obj_from_str

Function get_obj_from_str

sat/sgm/util.py:264–271  ·  view source on GitHub ↗
(string, reload=False, invalidate_cache=True)

Source from the content-addressed store, hash-verified

262
263
264def get_obj_from_str(string, reload=False, invalidate_cache=True):
265 module, cls = string.rsplit(".", 1)
266 if invalidate_cache:
267 importlib.invalidate_caches()
268 if reload:
269 module_imp = importlib.import_module(module)
270 importlib.reload(module_imp)
271 return getattr(importlib.import_module(module, package=None), cls)
272
273
274def append_zero(x):

Callers 6

train_video.pyFile · 0.90
__init__Method · 0.90
sampling_mainFunction · 0.90
load_partial_from_configFunction · 0.70
instantiate_from_configFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected