Skip to content

Commit db3390d

Browse files
authored
Pin mypy CI Transformers to the examples version (pytorch#22654)
### Summary Match the Transformers 5.0.0rc1 pin in requirements-examples.txt and include the workflow in the pip cache key. This prevents upstream API removals from breaking mypy on unchanged model tests. ### Test plan Validated with lintrunner --all-files --take MYPY. Authored with OpenAI Codex.
1 parent e9025a9 commit db3390d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/lint.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
python-version: '3.11'
4343
cache: 'pip'
4444
cache-dependency-path: |
45+
.github/workflows/lint.yml
4546
requirements-lintrunner.txt
4647
torch_pin.py
4748
@@ -56,7 +57,8 @@ jobs:
5657
pip install lintrunner==0.12.7 lintrunner-adapters==0.14.1
5758
pip install -r requirements-lintrunner.txt
5859
USE_CPP=0 pip install --no-build-isolation third-party/ao
59-
pip install pytest numpy parameterized huggingface_hub transformers timm expecttest types-requests
60+
# Match requirements-examples.txt for the model APIs checked by mypy.
61+
pip install pytest numpy parameterized huggingface_hub "transformers==5.0.0rc1" timm expecttest types-requests
6062
6163
- name: Generate mypy stubs for C++ bindings
6264
run: |

0 commit comments

Comments
 (0)