MCPcopy
hub / github.com/microsoft/qlib / split_module_path

Function split_module_path

qlib/utils/mod.py:49–64  ·  view source on GitHub ↗

Parameters ---------- module_path : str e.g. "a.b.c.ClassName" Returns ------- Tuple[str, str] e.g. ("a.b.c", "ClassName")

(module_path: str)

Source from the content-addressed store, hash-verified

47
48
49def split_module_path(module_path: str) -> Tuple[str, str]:
50 """
51
52 Parameters
53 ----------
54 module_path : str
55 e.g. "a.b.c.ClassName"
56
57 Returns
58 -------
59 Tuple[str, str]
60 e.g. ("a.b.c", "ClassName")
61 """
62 *m_path, cls = module_path.split(".")
63 m_path = ".".join(m_path)
64 return m_path, cls
65
66
67def get_callable_kwargs(config: InstConf, default_module: Union[str, ModuleType] = None) -> (type, dict):

Callers 1

get_callable_kwargsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected