MCPcopy Create free account
hub / github.com/Vchitect/Latte / get_module_dir_by_obj_name

Function get_module_dir_by_obj_name

tools/dnnlib/util.py:295–298  ·  view source on GitHub ↗

Get the directory path of the module containing the given object name.

(obj_name: str)

Source from the content-addressed store, hash-verified

293
294
295def get_module_dir_by_obj_name(obj_name: str) -> str:
296 """Get the directory path of the module containing the given object name."""
297 module, _ = get_module_from_obj_name(obj_name)
298 return os.path.dirname(inspect.getfile(module))
299
300
301def is_top_level_function(obj: Any) -> bool:

Callers

nothing calls this directly

Calls 1

get_module_from_obj_nameFunction · 0.85

Tested by

no test coverage detected