Skip to content

Commit 1145c15

Browse files
committed
Use the correct path for the pacakge __init__.py
Signed-off-by: M Q <mingmelvinq@nvidia.com>
1 parent d200043 commit 1145c15

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

monai/deploy/utils/importutil.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,14 +433,11 @@ def __getattr__(name):
433433

434434

435435
def fix_holoscan_import():
436-
"""Fix holoscan submodule core's __init__ to enable lazy load for avoiding failure on loading low level libs."""
436+
"""Fix holoscan __init__ to enable lazy load for avoiding failure on loading low level libs."""
437437

438438
holoscan_package_name = "holoscan"
439-
holoscan_core_module_name = "core"
440439
holoscan_package_path = dist_module_path(holoscan_package_name)
441-
holoscan_core_init_path = (
442-
Path(holoscan_package_path) / holoscan_package_name / holoscan_core_module_name / "__init__.py"
443-
)
440+
holoscan_core_init_path = Path(holoscan_package_path) / holoscan_package_name / "__init__.py"
444441

445442
with open(holoscan_core_init_path, "w") as f_w:
446443
f_w.write(holoscan_init_content_txt)

run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ install_python_dev_deps() {
333333

334334
fix_holoscan_import() {
335335
local holoscan_package_path=$(${MONAI_PY_EXE} $TOP/monai/deploy/utils/importutil.py dist_module_path holoscan)
336-
c_echo b "holoscan package core module path : " Z "${holoscan_package_path}/holoscan/core"
336+
c_echo b "holoscan_package_path : " Z "${holoscan_package_path}"
337337
c_echo b "fixing holoscan package module import..."
338338
${MONAI_PY_EXE} $TOP/monai/deploy/utils/importutil.py fix_holoscan_import
339339
c_echo b "done fixing."

0 commit comments

Comments
 (0)