@@ -104,15 +104,34 @@ def install_requirements(use_pytorch_nightly):
104104 if use_pytorch_nightly
105105 else "torchvision"
106106 ), # For testing.
107+ "typing-extensions" ,
107108 ]
108109
110+ # pip packages needed to run examples.
111+ # TODO: Make each example publish its own requirements.txt
109112 EXAMPLES_REQUIREMENTS = [
113+ "timm==1.0.7" ,
110114 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.
111128 ]
112129
113130 # Assemble the list of requirements to actually install.
114131 # 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+ )
116135
117136 # Install the requirements. `--extra-index-url` tells pip to look for package
118137 # versions on the provided URL if they aren't available on the default URL.
@@ -122,8 +141,6 @@ def install_requirements(use_pytorch_nightly):
122141 "-m" ,
123142 "pip" ,
124143 "install" ,
125- "-r" ,
126- "requirements-examples.txt" ,
127144 * REQUIREMENTS_TO_INSTALL ,
128145 "--extra-index-url" ,
129146 TORCH_NIGHTLY_URL ,
@@ -143,8 +160,6 @@ def install_requirements(use_pytorch_nightly):
143160 "-m" ,
144161 "pip" ,
145162 "install" ,
146- # Without --no-build-isolation, setup.py can't find the torch module.
147- "--no-build-isolation" ,
148163 * LOCAL_REQUIREMENTS ,
149164 ],
150165 check = True ,
0 commit comments