Skip to content

Commit cf1ef36

Browse files
committed
Remove torchaudio and torchvision from core dependencies
1 parent 040897e commit cf1ef36

File tree

3 files changed

+2
-34
lines changed

3 files changed

+2
-34
lines changed

install_requirements.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ def install_requirements(use_pytorch_nightly):
7272
)
7373
sys.exit(1)
7474

75-
# pip packages needed by exir.
76-
TORCH_PACKAGE = [
77-
# Setting use_pytorch_nightly to false to test the pinned PyTorch commit. Note
78-
# that we don't need to set any version number there because they have already
79-
# been installed on CI before this step, so pip won't reinstall them
80-
"torch==2.8.0" if use_pytorch_nightly else "torch",
81-
]
82-
8375
# Install the requirements for core ExecuTorch package.
8476
# `--extra-index-url` tells pip to look for package
8577
# versions on the provided URL if they aren't available on the default URL.
@@ -91,7 +83,6 @@ def install_requirements(use_pytorch_nightly):
9183
"install",
9284
"-r",
9385
"requirements-dev.txt",
94-
*TORCH_PACKAGE,
9586
"--extra-index-url",
9687
TORCH_URL,
9788
],
@@ -130,25 +121,6 @@ def install_requirements(use_pytorch_nightly):
130121

131122

132123
def install_optional_example_requirements(use_pytorch_nightly):
133-
print("Installing torch domain libraries")
134-
DOMAIN_LIBRARIES = [
135-
("torchvision==0.23.0" if use_pytorch_nightly else "torchvision"),
136-
"torchaudio==2.8.0" if use_pytorch_nightly else "torchaudio",
137-
]
138-
# Then install domain libraries
139-
subprocess.run(
140-
[
141-
sys.executable,
142-
"-m",
143-
"pip",
144-
"install",
145-
*DOMAIN_LIBRARIES,
146-
"--extra-index-url",
147-
TORCH_URL,
148-
],
149-
check=True,
150-
)
151-
152124
print("Installing packages in requirements-examples.txt")
153125
subprocess.run(
154126
[
@@ -158,10 +130,6 @@ def install_optional_example_requirements(use_pytorch_nightly):
158130
"install",
159131
"-r",
160132
"requirements-examples.txt",
161-
"--extra-index-url",
162-
TORCH_URL,
163-
"--upgrade-strategy",
164-
"only-if-needed",
165133
],
166134
check=True,
167135
)

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ dependencies=[
6868
"ruamel.yaml",
6969
"sympy",
7070
"torch>=2.8.0,<2.9.0",
71-
"torchaudio>=2.8.0,<2.9.0",
72-
"torchvision>=0.23.0,<0.24.0",
7371
"torchao==0.12.0",
7472
"tabulate",
7573
# See also third-party/TARGETS for buck's typing-extensions version.

requirements-examples.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ timm == 1.0.7
55
torchsr == 1.0.4
66
torchtune >= 0.6.1
77
transformers ==4.47.1
8+
torchaudio>=2.8.0,<2.9.0
9+
torchvision>=0.23.0,<0.24.0

0 commit comments

Comments
 (0)