(string, reload=False)
| 38 | |
| 39 | |
| 40 | def 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 | |
| 48 | def load_npz_from_dir(data_dir): |
no outgoing calls
no test coverage detected