MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / load_module_from_path

Function load_module_from_path

custom_ops/setup_ops.py:29–37  ·  view source on GitHub ↗

load python module from path

(module_name, path)

Source from the content-addressed store, hash-verified

27
28
29def load_module_from_path(module_name, path):
30 """
31 load python module from path
32 """
33 spec = importlib.util.spec_from_file_location(module_name, path)
34 module = importlib.util.module_from_spec(spec)
35 sys.modules[module_name] = module
36 spec.loader.exec_module(module)
37 return module
38
39
40def update_git_repo():

Callers 2

setup_ops_cpu.pyFile · 0.85
setup_ops.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected