Skip to content

Commit 33debd3

Browse files
wprazuchclaude
andcommitted
fix(launcher): re-raise unrelated ModuleNotFoundError in container_metadata init
The bare `except ModuleNotFoundError: pass` silently swallowed errors from transitive dependencies (pydantic, structlog, etc.) when nemo_evaluator was on PYTHONPATH as source but its deps were not installed. This made extract_framework_yml silently disappear from the namespace. Now only suppresses the error when nemo_evaluator itself is the missing module; any other missing dependency is re-raised. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
1 parent 73877e9 commit 33debd3

File tree

1 file changed

+6
-2
lines changed
  • packages/nemo-evaluator-launcher/src/nemo_evaluator_launcher/common/container_metadata

1 file changed

+6
-2
lines changed

packages/nemo-evaluator-launcher/src/nemo_evaluator_launcher/common/container_metadata/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
"parse_framework_to_irs",
5757
]
5858
)
59-
except ModuleNotFoundError:
59+
except ModuleNotFoundError as exc:
6060
# Allow importing this package for IR-only workflows (docs autogen, etc.)
61-
pass
61+
# Only suppress when nemo_evaluator itself is missing; re-raise if a
62+
# transitive dependency (pydantic, structlog, …) is absent — that is a
63+
# broken installation, not an IR-only workflow.
64+
if exc.name is None or not exc.name.startswith("nemo_evaluator"):
65+
raise

0 commit comments

Comments
 (0)