You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
External Yolo-template recipe fails to import in a clean pip install (undeclared deps: object-detection-metrics/podm, ultralytics, shapely) #363
An external recipe that uses the built-in Yolo template cannot be imported or validated in a clean environment created with pip install qai-hub-models, because several packages that the template imports at module load are not declared as dependencies of the base package. Following EXTERNAL_ONBOARDING.md end-to-end, the first qai-hub-models validate <folder> fails with ModuleNotFoundError.
Environment
qai_hub_models 0.66.0 (pip), qai_hub 0.56.0
Python 3.12, clean venv, Linux x86_64
External recipe with templates: [yolo], model subclassing qai_hub_models.models.templates.yolo.model.Yolo
Create an external recipe whose model.py imports the Yolo template (same pattern as the in-tree yolox recipe).
Run qai-hub-models validate <recipe_folder> (or simply import qai_hub_models.models.templates.yolo.model).
Actual behavior
Import fails in stages; each missing package must be discovered and installed manually:
qai_hub_models/models/templates/detection/detection_evaluator.py:14 from podm.metrics import BoundingBox, MetricPerClass, get_pascal_voc_metrics
→ ModuleNotFoundError: No module named 'podm'
Note: the PyPI package literally named podm is an unrelated Object-JSON mapper. As the comment in detection_evaluator.py says, this import is provided by the object-detection-metrics package — but nothing installs or declares it.
After installing object-detection-metrics: podm/coco.py fails with ModuleNotFoundError: No module named 'shapely'.
qai_hub_models/models/templates/yolo/yolo_segmentation_evaluator.py:10 from ultralytics.utils.ops import process_mask
→ ModuleNotFoundError: No module named 'ultralytics'
After manually installing object-detection-metrics, shapely and ultralytics, the same recipe validates cleanly (28 passed, 0 failed, 0 warnings), so the recipe code itself is fine — only the dependency declarations are missing.
Expected behavior
One of:
the base package declares the template runtime dependencies it imports unconditionally, or
validate's install step installs the dependencies of the templates declared in the recipe's manifest.yaml, or
EXTERNAL_ONBOARDING.md lists these extra packages as required for template-based recipes.
In-tree development masks this because the repo dev environment installs everything; external contributors hit it on their first recipe.
It looks like you missed running qai-hub-models install <yolo_model_name>. Running install will include the object-detection-metrics and ultralytics packages.
Activity
kory commentedon Nov 18, 2026
Hi AI & Computer Vision Engineer in Tokyo | Edge AI, Model Optimization & Multimedia Systems | Author of Dancing with AI (@anguoyang) ,
It looks like you missed running
qai-hub-models install <yolo_model_name>. Running install will include the object-detection-metrics and ultralytics packages.Keep reminding about unanswered GitHub issues for 30 days in customer…