Skip to content
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

build: pin torchvision to latest nightly #1584

Merged
merged 1 commit into from
Nov 14, 2022
Merged

Conversation

ashay
Copy link
Collaborator

@ashay ashay commented Nov 14, 2022

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

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
@ashay ashay requested a review from powderluv November 14, 2022 20:48
@ashay ashay merged commit f1ef568 into main Nov 14, 2022
@ashay ashay deleted the ashay/pin-torchvision-to-latest branch November 14, 2022 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants