@@ -104,15 +104,34 @@ def install_requirements(use_pytorch_nightly):
104
104
if use_pytorch_nightly
105
105
else "torchvision"
106
106
), # For testing.
107
+ "typing-extensions" ,
107
108
]
108
109
110
+ # pip packages needed to run examples.
111
+ # TODO: Make each example publish its own requirements.txt
109
112
EXAMPLES_REQUIREMENTS = [
113
+ "timm==1.0.7" ,
110
114
f"torchaudio==2.6.0.{ NIGHTLY_VERSION } " if use_pytorch_nightly else "torchaudio" ,
115
+ "torchsr==1.0.4" ,
116
+ "transformers==4.47.1" ,
117
+ ]
118
+
119
+ # pip packages needed for development.
120
+ DEVEL_REQUIREMENTS = [
121
+ "cmake" , # For building binary targets.
122
+ "pip>=23" , # For building the pip package.
123
+ "pyyaml" , # Imported by the kernel codegen tools.
124
+ "setuptools>=63" , # For building the pip package.
125
+ "tomli" , # Imported by extract_sources.py when using python < 3.11.
126
+ "wheel" , # For building the pip package archive.
127
+ "zstd" , # Imported by resolve_buck.py.
111
128
]
112
129
113
130
# Assemble the list of requirements to actually install.
114
131
# TODO: Add options for reducing the number of requirements.
115
- REQUIREMENTS_TO_INSTALL = EXIR_REQUIREMENTS + EXAMPLES_REQUIREMENTS
132
+ REQUIREMENTS_TO_INSTALL = (
133
+ EXIR_REQUIREMENTS + DEVEL_REQUIREMENTS + EXAMPLES_REQUIREMENTS
134
+ )
116
135
117
136
# Install the requirements. `--extra-index-url` tells pip to look for package
118
137
# versions on the provided URL if they aren't available on the default URL.
@@ -122,8 +141,6 @@ def install_requirements(use_pytorch_nightly):
122
141
"-m" ,
123
142
"pip" ,
124
143
"install" ,
125
- "-r" ,
126
- "requirements-examples.txt" ,
127
144
* REQUIREMENTS_TO_INSTALL ,
128
145
"--extra-index-url" ,
129
146
TORCH_NIGHTLY_URL ,
@@ -143,8 +160,6 @@ def install_requirements(use_pytorch_nightly):
143
160
"-m" ,
144
161
"pip" ,
145
162
"install" ,
146
- # Without --no-build-isolation, setup.py can't find the torch module.
147
- "--no-build-isolation" ,
148
163
* LOCAL_REQUIREMENTS ,
149
164
],
150
165
check = True ,
0 commit comments