Use correct transformers and timm version during linting#18535
Use correct transformers and timm version during linting#18535AdrianLundell wants to merge 3 commits intopytorch:mainfrom
Conversation
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
🔗 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 SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 5 New Failures, 1 Cancelled Job, 3 Unrelated FailuresAs of commit ad7f535 with merge base 32a6cec ( 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. |
|
@digantdesai @SS-JIA do you want to take a look at this? |
There was a problem hiding this comment.
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-pythonpip cache keying to includerequirements-examples.txt. - Install example requirements from
requirements-examples.txtinstead of installing latesttransformers/timmdirectly.
💡 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 |
There was a problem hiding this comment.
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.
| 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 |
| 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 |
There was a problem hiding this comment.
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.
| pip install -r requirements-examples.txt | |
| pip install -c requirements-examples.txt transformers timm |
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