Skip to content

Use correct transformers and timm version during linting#18535

Open
AdrianLundell wants to merge 3 commits intopytorch:mainfrom
AdrianLundell:change-1230006
Open

Use correct transformers and timm version during linting#18535
AdrianLundell wants to merge 3 commits intopytorch:mainfrom
AdrianLundell:change-1230006

Conversation

@AdrianLundell
Copy link
Copy Markdown
Collaborator

@AdrianLundell AdrianLundell commented Mar 27, 2026

Previously install_executorch.sh installed the versions pinned in requirements-examples.txt, while the linting job installed the latest version, leading to diffs. Fix this by installing the requirements directly from requirements-examples.txt instead.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell

Previously install_executorch.sh installed the versions pinned in
requirements-examples.txt, while the linting job installed the latest
version, leading to diffs. Fix this by installing the requirements
directly from requirements-examples.txt instead.

Signed-off-by: Adrian Lundell <adrian.lundell@arm.com>
Change-Id: I08945f719e36b726de9584560c41bdcf79c297f9
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 27, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18535

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:

❌ 5 New Failures, 1 Cancelled Job, 3 Unrelated Failures

As of commit ad7f535 with merge base 32a6cec (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

BROKEN TRUNK - The following jobs 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 Mar 27, 2026
@AdrianLundell AdrianLundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes ciflow/trunk labels Mar 27, 2026
@Sebastian-Larsson
Copy link
Copy Markdown
Collaborator

@digantdesai @SS-JIA do you want to take a look at this?

Copy link
Copy Markdown
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

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

Thanks.

Copilot AI review requested due to automatic review settings April 27, 2026 10:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the linting workflow to install the same pinned transformers/timm versions used elsewhere (via requirements-examples.txt), avoiding version drift between CI jobs.

Changes:

  • Expand actions/setup-python pip cache keying to include requirements-examples.txt.
  • Install example requirements from requirements-examples.txt instead of installing latest transformers/timm directly.

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

pip install -r requirements-lintrunner.txt
USE_CPP=0 pip install --no-build-isolation third-party/ao
pip install pytest numpy parameterized huggingface_hub transformers timm expecttest types-requests
pip install -r requirements-examples.txt
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

pip install -r requirements-examples.txt is done without the pip flags used by install_requirements.py (notably --extra-index-url for the PyTorch wheel index and --upgrade-strategy only-if-needed). To keep the lint environment consistent and avoid pip potentially upgrading/downgrading already-installed torch packages while resolving deps, consider adding the same flags here.

Suggested change
pip install -r requirements-examples.txt
pip install --upgrade-strategy only-if-needed --extra-index-url https://download.pytorch.org/whl/cpu -r requirements-examples.txt

Copilot uses AI. Check for mistakes.
pip install -r requirements-lintrunner.txt
USE_CPP=0 pip install --no-build-isolation third-party/ao
pip install pytest numpy parameterized huggingface_hub transformers timm expecttest types-requests
pip install -r requirements-examples.txt
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

Installing the full requirements-examples.txt in the mypy lint job pulls in extra heavy/remote deps (e.g., the VCS torchtune install) even though the MYPY linter currently only type-checks a subset of examples/** (mostly examples/openvino/**). If the goal is just to pin transformers/timm during linting, consider using requirements-examples.txt as a constraints file (or creating a smaller CI-specific requirements file) so the job doesn’t need to install unrelated example dependencies.

Suggested change
pip install -r requirements-examples.txt
pip install -c requirements-examples.txt transformers timm

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants