Install yolo26 requirements before portable export in CI#20526
Install yolo26 requirements before portable export in CI#20526digantdesai wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20526
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 1 Unrelated Failure, 7 Unclassified FailuresAs of commit c75a565 with merge base e03f777 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
test_model.sh exports yolo26 via examples.portable.scripts.export, but yolo26's model imports ultralytics, which was never installed -- the CI job failed with ModuleNotFoundError: No module named 'ultralytics'. Install examples/models/yolo26/requirements.txt before the export, matching the per-model dep handling already used for llava/edsr/mb. torch/torchvision are already installed and satisfy ultralytics, so --upgrade-strategy only-if-needed leaves them untouched and no pytorch extra-index-url is needed. Authored with Claude assistance.
c01299d to
c75a565
Compare
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR updates the CI model test script to install YOLO26’s Python dependencies before running the portable export path, preventing failures when examples.portable.scripts.export imports the YOLO26 model code that requires ultralytics.
Changes:
- Add a
MODEL_NAME == "yolo26"branch in.ci/scripts/test_model.shtopip installexamples/models/yolo26/requirements.txtprior to export.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Install yolo26 requirements (ultralytics). torch/torchvision are already | ||
| # installed and satisfy ultralytics, so only-if-needed leaves them as-is. | ||
| # No pytorch extra-index-url: it is unused here and would broaden pip's | ||
| # version resolution across all deps. | ||
| "${PYTHON_EXECUTABLE}" -m pip install --upgrade-strategy only-if-needed -r examples/models/yolo26/requirements.txt |
| return | ||
| fi | ||
|
|
||
| if [[ "${MODEL_NAME}" == "yolo26" ]]; then |
There was a problem hiding this comment.
We could maybe do it more generic with something like this?
if [[ -f "examples/models/${MODEL_NAME}/requirements.txt" ]]; then
"${PYTHON_EXECUTABLE}" -m pip install --upgrade-strategy only-if-needed -r examples/models/${MODEL_NAME}/requirements.txt
fi
But then we need to have one to one mapping for models and folders so it might not work in all cases.
test_model.sh exports yolo26 via examples.portable.scripts.export, but yolo26's model imports ultralytics, which was never installed -- the CI job failed with ModuleNotFoundError: No module named 'ultralytics'.
Install examples/models/yolo26/requirements.txt before the export, matching the per-model dep handling already used for llava/edsr/mb. Use the README's install command (--upgrade-strategy only-if-needed, CPU extra-index) so the ultralytics torch/torchvision deps do not upgrade ExecuTorch's pinned versions.
Authored with Claude assistance.