Skip to content

Commit 4750927

Browse files
committed
Install torchao by default (#7470)
Summary: Now that torchao is not experimental anymore, we can rely on torchao directly via git submodule. Part of #7460 (cherry picked from commit a861294)
1 parent 02783ff commit 4750927

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

examples/models/llama/install_requirements.sh

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
# Install sentencepiece for llama tokenizer
1010
pip install snakeviz sentencepiece
1111

12-
# Install torchao.
13-
pip install "$(dirname "$0")/../../../third-party/ao"
14-
1512
# Install lm-eval for Model Evaluation with lm-evalution-harness
1613
# Install tiktoken for tokenizer
1714
pip install lm_eval==0.4.5

examples/models/llama3_2_vision/install_requirements.sh

-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ NIGHTLY_VERSION="dev20241112"
99

1010
# Install torchtune nightly for model definitions.
1111
pip install --pre torchtune==0.4.0.${NIGHTLY_VERSION} --extra-index-url https://download.pytorch.org/whl/nightly/cpu --no-cache-dir
12-
13-
# Install torchao.
14-
pip install "$(dirname "$0")/../../../third-party/ao"

examples/models/phi-3-mini-lora/install_requirements.sh

-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@
88
pip install torchvision
99
pip install torchtune
1010
pip install tiktoken
11-
12-
# Install torchao.
13-
pip install "$(dirname "$0")/../../../third-party/ao"

install_requirements.py

+17
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,23 @@ def python_is_compatible():
166166
check=True,
167167
)
168168

169+
LOCAL_REQUIREMENTS = [
170+
"third-party/ao", # We need the latest kernels for fast iteration, so not relying on pypi.
171+
]
172+
173+
# Install packages directly from local copy instead of pypi.
174+
# This is usually not recommended.
175+
subprocess.run(
176+
[
177+
sys.executable,
178+
"-m",
179+
"pip",
180+
"install",
181+
*LOCAL_REQUIREMENTS,
182+
],
183+
check=True,
184+
)
185+
169186
#
170187
# Install executorch pip package. This also makes `flatc` available on the path.
171188
# The --extra-index-url may be necessary if pyproject.toml has a dependency on a

0 commit comments

Comments
 (0)