Skip to content

[pyproject.toml] Add a dependency on torch==2.3 #3277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .ci/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ retry () {
install_executorch() {
which pip
# Install executorch, this assumes that Executorch is checked out in the
# current directory
pip install . --no-build-isolation -v
# current directory. The --extra-index-url options tell pip to look on the
# pytorch servers for nightly and pre-release versions of torch packages.
pip install . --no-build-isolation -v \
--extra-index-url https://download.pytorch.org/whl/test/cpu \
--extra-index-url https://download.pytorch.org/whl/nightly/cpu
# Just print out the list of packages for debugging
pip list
}
Expand Down
4 changes: 3 additions & 1 deletion examples/models/llava_encoder/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

set -x

# install llava from the submodule
pip install --force-reinstall -e examples/third-party/LLaVA

Expand All @@ -19,4 +21,4 @@ pip install bitsandbytes -I
# For example, torch version required from llava is older than ExecuTorch.
# To make both work, recover ExecuTorch's original dependencies by rerunning
# the install_requirements.sh.
./install_requirements.sh
bash -x ./install_requirements.sh
5 changes: 4 additions & 1 deletion install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ $PIP_EXECUTABLE install --extra-index-url "${TORCH_URL}" \

#
# Install executorch pip package. This also makes `flatc` available on the path.
# The --extra-index-url may be necessary if pyproject.toml has a dependency on a
# pre-release or nightly version of a torch package.
#

EXECUTORCH_BUILD_PYBIND="${EXECUTORCH_BUILD_PYBIND}" \
CMAKE_ARGS="${CMAKE_ARGS}" \
$PIP_EXECUTABLE install . --no-build-isolation -v
$PIP_EXECUTABLE install . --no-build-isolation -v \
--extra-index-url "${TORCH_URL}"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ classifiers = [
]

# Python dependencies required for use.
requires-python = ">=3.10"
dependencies=[
"expecttest",
"flatbuffers",
Expand All @@ -61,6 +60,7 @@ dependencies=[
"ruamel.yaml",
"sympy",
"tabulate",
"torch==2.3",
]

[project.urls]
Expand Down