-
Notifications
You must be signed in to change notification settings - Fork 668
Install examples and domain libraries as last (optional) step #11653
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11653
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 179 PendingAs of commit 9e0e259 with merge base 884e901 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
64aa992
to
ebc7f2e
Compare
install_executorch.py
Outdated
DOMAIN_LIBRARIES = [ | ||
( | ||
f"torchvision==0.23.0.{NIGHTLY_VERSION}" | ||
if use_pytorch_nightly | ||
else "torchvision" | ||
), | ||
f"torchaudio==2.8.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torchaudio", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of doing this here vs. in install_requirements
? When developing the wheel people will run install_executorch.py
multiple times, so now this will cause pip to attempt to install these examples multiple time (even though it won't cause it's already installed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even today, when people run install_executorch.py, it will transitively call install_requirements.py anyway.
The reason i did it here is to install the non core optional steps as last time. That way, people can do,
./install_requirements.py
pip install .e
to install minimal core package.
This is useful for running on Intel Mac OS for instance. We can compile torch from source and use it as part of ET. Now today, we will require people to also compile torchvision and torchaudio from source on top of torch. See context here: #10652
33ad487
to
390171f
Compare
# is used instead of nightly. CI jobs wouldn't be able to catch regression from the | ||
# latest PT commit otherwise | ||
install_requirements(use_pytorch_nightly=not args.use_pt_pinned_commit) | ||
os.execvp( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to change back from os.execvp to subprocess since install_optional_example_requirement is never reachable because os.execvp completely replaces the current process with the pip install command
fe94337
to
bc9bfb8
Compare
bc9bfb8
to
9e0e259
Compare
…h#11653) Install requirements is installing so many things that's not necessary for core executorch runtime. For example, it's not necessary to install packages that is used in examples. Ideally, developers should just run to install core ET. ``` install_requirement.sh pip install . -e ```
#11653 added `--example` argument to install torchvision. We need to add that for testing wheels.
#11653 added `--example` argument to install torchvision. We need to add that for testing wheels.
pytorch#11653 added `--example` argument to install torchvision. We need to add that for testing wheels.
The current executorch pin needs to be updated The next time the docker image gets rebuilt, the executorch docker build is going to fail like https://github.com/pytorch/pytorch/actions/runs/16626853655/job/47137807966 The failure is that the pin uses a version of the nightly that has been removed from the nightly index ``` #62 72.30 ERROR: Could not find a version that satisfies the requirement torch==2.8.0.dev20250601 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.7.1, 2.8.0.dev20250602+cpu, 2.8.0.dev20250603+cpu, 2.8.0.dev20250604+cpu, 2.8.0.dev20250605+cpu, 2.8.0.dev20250606+cpu, 2.8.0.dev20250607+cpu, 2.8.0.dev20250608+cpu, 2.8.0.dev20250609+cpu, 2.8.0.dev20250610+cpu, 2.8.0.dev20250611+cpu, 2.8.0.dev20250612+cpu, 2.8.0.dev20250613+cpu, 2.8.0.dev20250614+cpu, 2.8.0.dev20250615+cpu, 2.8.0.dev20250616+cpu, 2.8.0.dev20250617+cpu, 2.8.0.dev20250618+cpu, 2.8.0.dev20250619+cpu, 2.8.0.dev20250620+cpu, 2.8.0.dev20250621+cpu, 2.8.0.dev20250622+cpu, 2.8.0.dev20250623+cpu, 2.8.0.dev20250624+cpu, 2.8.0.dev20250625+cpu, 2.8.0.dev20250626+cpu, 2.8.0.dev20250627+cpu, 2.9.0.dev20250628+cpu, 2.9.0.dev20250629+cpu, 2.9.0.dev20250630+cpu, 2.9.0.dev20250701+cpu, 2.9.0.dev20250702+cpu, 2.9.0.dev20250703+cpu, 2.9.0.dev20250704+cpu, 2.9.0.dev20250705+cpu, 2.9.0.dev20250706+cpu, 2.9.0.dev20250707+cpu, 2.9.0.dev20250708+cpu, 2.9.0.dev20250709+cpu, 2.9.0.dev20250710+cpu, 2.9.0.dev20250711+cpu, 2.9.0.dev20250712+cpu, 2.9.0.dev20250713+cpu, 2.9.0.dev20250714+cpu, 2.9.0.dev20250715+cpu, 2.9.0.dev20250716+cpu, 2.9.0.dev20250717+cpu, 2.9.0.dev20250718+cpu, 2.9.0.dev20250719+cpu, 2.9.0.dev20250720+cpu, 2.9.0.dev20250722+cpu, 2.9.0.dev20250723+cpu, 2.9.0.dev20250724+cpu, 2.9.0.dev20250725+cpu, 2.9.0.dev20250726+cpu, 2.9.0.dev20250727+cpu, 2.9.0.dev20250728+cpu, 2.9.0.dev20250729+cpu, 2.9.0.dev20250730+cpu, 2.9.0.dev20250731+cpu) #62 72.30 ERROR: No matching distribution found for torch==2.8.0.dev20250601 ``` The executorch hash update currently fails due to https://github.com/pytorch/pytorch/actions/runs/16636773244/job/47079169392 ``` 2025-07-31T01:56:57.0249165Z + echo 'expecting triton to not be installed, but it is' 2025-07-31T01:56:57.0249614Z expecting triton to not be installed, but it is 2025-07-31T01:56:57.0249969Z + exit 1 2025-07-31T01:58:27.6764352Z ##[error]Final attempt failed. Child_process exited with error code 1 ``` I believe the cause is pytorch/executorch#11653 where the nightly pytorch is installed from our index, but then requirements-examples installs timm from pypi, which reinstalls pytorch, except its the release build for cuda from pypi? Which then causes triton to be installed. I don't know what the intended behavior is so I'm disabling the executorch docker build, executorch build, and the nightly hash update, and apparently the test was already disabled because it was failing Pull Request resolved: #159595 Approved by: https://github.com/malfet
The current executorch pin needs to be updated The next time the docker image gets rebuilt, the executorch docker build is going to fail like https://github.com/pytorch/pytorch/actions/runs/16626853655/job/47137807966 The failure is that the pin uses a version of the nightly that has been removed from the nightly index ``` #62 72.30 ERROR: Could not find a version that satisfies the requirement torch==2.8.0.dev20250601 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.7.1, 2.8.0.dev20250602+cpu, 2.8.0.dev20250603+cpu, 2.8.0.dev20250604+cpu, 2.8.0.dev20250605+cpu, 2.8.0.dev20250606+cpu, 2.8.0.dev20250607+cpu, 2.8.0.dev20250608+cpu, 2.8.0.dev20250609+cpu, 2.8.0.dev20250610+cpu, 2.8.0.dev20250611+cpu, 2.8.0.dev20250612+cpu, 2.8.0.dev20250613+cpu, 2.8.0.dev20250614+cpu, 2.8.0.dev20250615+cpu, 2.8.0.dev20250616+cpu, 2.8.0.dev20250617+cpu, 2.8.0.dev20250618+cpu, 2.8.0.dev20250619+cpu, 2.8.0.dev20250620+cpu, 2.8.0.dev20250621+cpu, 2.8.0.dev20250622+cpu, 2.8.0.dev20250623+cpu, 2.8.0.dev20250624+cpu, 2.8.0.dev20250625+cpu, 2.8.0.dev20250626+cpu, 2.8.0.dev20250627+cpu, 2.9.0.dev20250628+cpu, 2.9.0.dev20250629+cpu, 2.9.0.dev20250630+cpu, 2.9.0.dev20250701+cpu, 2.9.0.dev20250702+cpu, 2.9.0.dev20250703+cpu, 2.9.0.dev20250704+cpu, 2.9.0.dev20250705+cpu, 2.9.0.dev20250706+cpu, 2.9.0.dev20250707+cpu, 2.9.0.dev20250708+cpu, 2.9.0.dev20250709+cpu, 2.9.0.dev20250710+cpu, 2.9.0.dev20250711+cpu, 2.9.0.dev20250712+cpu, 2.9.0.dev20250713+cpu, 2.9.0.dev20250714+cpu, 2.9.0.dev20250715+cpu, 2.9.0.dev20250716+cpu, 2.9.0.dev20250717+cpu, 2.9.0.dev20250718+cpu, 2.9.0.dev20250719+cpu, 2.9.0.dev20250720+cpu, 2.9.0.dev20250722+cpu, 2.9.0.dev20250723+cpu, 2.9.0.dev20250724+cpu, 2.9.0.dev20250725+cpu, 2.9.0.dev20250726+cpu, 2.9.0.dev20250727+cpu, 2.9.0.dev20250728+cpu, 2.9.0.dev20250729+cpu, 2.9.0.dev20250730+cpu, 2.9.0.dev20250731+cpu) #62 72.30 ERROR: No matching distribution found for torch==2.8.0.dev20250601 ``` The executorch hash update currently fails due to https://github.com/pytorch/pytorch/actions/runs/16636773244/job/47079169392 ``` 2025-07-31T01:56:57.0249165Z + echo 'expecting triton to not be installed, but it is' 2025-07-31T01:56:57.0249614Z expecting triton to not be installed, but it is 2025-07-31T01:56:57.0249969Z + exit 1 2025-07-31T01:58:27.6764352Z ##[error]Final attempt failed. Child_process exited with error code 1 ``` I believe the cause is pytorch/executorch#11653 where the nightly pytorch is installed from our index, but then requirements-examples installs timm from pypi, which reinstalls pytorch, except its the release build for cuda from pypi? Which then causes triton to be installed. I don't know what the intended behavior is so I'm disabling the executorch docker build, executorch build, and the nightly hash update, and apparently the test was already disabled because it was failing Pull Request resolved: #159595 Approved by: https://github.com/malfet
Install requirements is installing so many things that's not necessary for core executorch runtime. For example, it's not necessary to install packages that is used in examples.
Ideally, developers should just run to install core ET.