forked from llvm/torch-mlir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: pin torchvision to latest nightly (llvm#1584)
We currently pin the `torch` package to the latest nightly version, but since `torchvision` depends on the `torch` package, the pip resolver then has to run through an extensive list of `torchvision` packages that can be installed with the pinned `torch` package. This search fails in the RollPyTorch action, causing pip to settle on an old version of `torchvision` that does not work with our tests. In reality, we are only interested in a specific version of the `torchvision` package. To make the dependency explicit and to prevent test failures because of incorrect package installations, this patch makes two key changes: 1. `torchvision` is now pinned to the latest nightly release in pytorch-requirements.txt along with the version of `torch` that is necessary to install the requested `torchvision` package 2. The RollPyTorch action now looks for the latest `torchvision` package instead of the latest `torch` package before writing the version numbers for pinning in pytorch-requirements.txt
- Loading branch information
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html | ||
--pre | ||
torch==1.14.0.dev20221113 | ||
torchvision==0.15.0.dev20221113 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
-r pytorch-requirements.txt | ||
|
||
numpy | ||
torchvision | ||
|
||
# Build requirements. | ||
pybind11 | ||
|