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

Function get_obj_from_str

sat/vae_modules/utils.py:256–263  ·  view source on GitHub ↗
(string, reload=False, invalidate_cache=True)

Source from the content-addressed store, hash-verified

254
255
256def get_obj_from_str(string, reload=False, invalidate_cache=True):
257 module, cls = string.rsplit(".", 1)
258 if invalidate_cache:
259 importlib.invalidate_caches()
260 if reload:
261 module_imp = importlib.import_module(module)
262 importlib.reload(module_imp)
263 return getattr(importlib.import_module(module, package=None), cls)
264
265
266def append_zero(x):

Callers 3

load_partial_from_configFunction · 0.70
instantiate_from_configFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected