Commit 4d51bee
committed
fix(launcher): lazy-import nemo_evaluator in loading.py to fix docs env
The top-level `from nemo_evaluator.core.input import ...` in loading.py
triggered the full nemo_evaluator import chain (including pydantic) at
module import time. In docs environments where nemo_evaluator source is
on PYTHONPATH but pydantic is not installed, this caused a
ModuleNotFoundError for pydantic that was silently swallowed by the
try/except in __init__.py, making extract_framework_yml and
parse_framework_to_irs unavailable.
Move the import to the only call site (parse_framework_to_irs) so
loading.py can be imported without the full nemo_evaluator dep tree.
Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>1 parent 33debd3 commit 4d51bee
File tree
2 files changed
+5
-10
lines changed- packages/nemo-evaluator-launcher
- src/nemo_evaluator_launcher/common/container_metadata
- tests/unit_tests
2 files changed
+5
-10
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
943 | 942 | | |
944 | 943 | | |
945 | 944 | | |
| 945 | + | |
| 946 | + | |
946 | 947 | | |
947 | 948 | | |
948 | 949 | | |
| |||
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 211 | + | |
214 | 212 | | |
215 | 213 | | |
216 | 214 | | |
| |||
237 | 235 | | |
238 | 236 | | |
239 | 237 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 238 | + | |
243 | 239 | | |
244 | 240 | | |
245 | 241 | | |
| |||
274 | 270 | | |
275 | 271 | | |
276 | 272 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 273 | + | |
280 | 274 | | |
281 | 275 | | |
282 | 276 | | |
| |||
0 commit comments