Skip to content

Install yolo26 requirements before portable export in CI#20526

Open
digantdesai wants to merge 1 commit into
mainfrom
yolo26-install-ultralytics-deps
Open

Install yolo26 requirements before portable export in CI#20526
digantdesai wants to merge 1 commit into
mainfrom
yolo26-install-ultralytics-deps

Conversation

@digantdesai

Copy link
Copy Markdown
Contributor

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.

@pytorch-bot

pytorch-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🔗 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 SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 2 New Failures, 1 Unrelated Failure, 7 Unclassified Failures

As of commit c75a565 with merge base e03f777 (image):

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 26, 2026
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.
@digantdesai digantdesai force-pushed the yolo26-install-ultralytics-deps branch from c01299d to c75a565 Compare June 26, 2026 03:36
@digantdesai digantdesai marked this pull request as ready for review June 26, 2026 03:37
Copilot AI review requested due to automatic review settings June 26, 2026 03:37
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to pip install examples/models/yolo26/requirements.txt prior to export.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .ci/scripts/test_model.sh
Comment on lines +131 to +135
# 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
Comment thread .ci/scripts/test_model.sh
return
fi

if [[ "${MODEL_NAME}" == "yolo26" ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/periodic CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants