Skip to content

[Release 0.6] update install requirement pins #9747

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

Closed
wants to merge 2 commits into from
Closed
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
8 changes: 2 additions & 6 deletions install_executorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
from contextlib import contextmanager
from typing import List, Tuple

from install_requirements import (
install_requirements,
python_is_compatible,
TORCH_NIGHTLY_URL,
)
from install_requirements import install_requirements, python_is_compatible, TORCH_URL

# Set up logging
logging.basicConfig(
Expand Down Expand Up @@ -260,7 +256,7 @@ def main(args):
"--no-build-isolation",
"-v",
"--extra-index-url",
TORCH_NIGHTLY_URL,
TORCH_URL,
],
check=True,
)
Expand Down
13 changes: 5 additions & 8 deletions install_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def python_is_compatible():


# The pip repository that hosts nightly torch packages.
TORCH_NIGHTLY_URL = "https://download.pytorch.org/whl/nightly/cpu"

TORCH_URL = "https://download.pytorch.org/whl/test/cpu"

# Since ExecuTorch often uses main-branch features of pytorch, only the nightly
# pip versions will have the required features.
Expand All @@ -80,16 +79,14 @@ def install_requirements(use_pytorch_nightly):
# Setting use_pytorch_nightly to false to test the pinned PyTorch commit. Note
# that we don't need to set any version number there because they have already
# been installed on CI before this step, so pip won't reinstall them
f"torch==2.7.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torch",
"torch==2.7.0" if use_pytorch_nightly else "torch",
(
f"torchvision==0.22.0.{NIGHTLY_VERSION}"
if use_pytorch_nightly
else "torchvision"
"torchvision==0.23.0" if use_pytorch_nightly else "torchvision"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mergennachin what versions of torchvision and torchaudio are we pinning to for 0.6?

), # For testing.
]

EXAMPLES_REQUIREMENTS = [
f"torchaudio==2.6.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torchaudio",
"torchaudio==2.7.0" if use_pytorch_nightly else "torchaudio",
]

# Assemble the list of requirements to actually install.
Expand All @@ -110,7 +107,7 @@ def install_requirements(use_pytorch_nightly):
"requirements-dev.txt",
*REQUIREMENTS_TO_INSTALL,
"--extra-index-url",
TORCH_NIGHTLY_URL,
TORCH_URL,
],
check=True,
)
Expand Down
Loading