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

Upgrade PyTorch version to v2.2.1 #2279

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

tenzen-y
Copy link
Member

What this PR does / why we need it:
I upgraded PyTorch version to v2.2.1.
This is a blocker of #2278

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Checklist:

  • Docs included if any changes are user facing

@tenzen-y
Copy link
Member Author

We need to restart the Go Test / Unit Test (1.26.1) (pull_request).

Anyway, this PR is ready for the review. PTAL

/assign @andreyvelich @johnugeorge

@tenzen-y tenzen-y changed the title Upgrade PyTorch version to v2.2.2 Upgrade PyTorch version to v2.2.1 Mar 10, 2024
torch==1.13.1
torchvision==0.14.1
torch==2.2.1
torchvision==0.17.1
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@@ -1,4 +1,4 @@
cloudml-hypertune==0.1.0.dev6
torch==1.13.1
torchvision==0.14.1
torch==2.2.1
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to install torch version in requirements if we already using nvcr.io/nvidia/pytorch:24.01-py3 image ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess that it is no need, but I'm not sure that having separate requirements.txt would be worth it. @andreyvelich WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

@tenzen-y We are still installing cloudml-hypertune and Pillow in the requirements file, so I think we can keep it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I see. You meant that we should install torch and torch vision via Dockerfile, instead of requirements.txt, right?

Copy link
Member

Choose a reason for hiding this comment

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

I thought torch package is already installed as part of this image nvcr.io/nvidia/pytorch:24.01-py3, isn't ?
I am not sure about torchvision tho

Copy link
Member Author

@tenzen-y tenzen-y Mar 11, 2024

Choose a reason for hiding this comment

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

Yes, both torch and torchvisoin are packaged in NVIDIA image.
Let me create a separate requirements.txt.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@andreyvelich andreyvelich Mar 11, 2024

Choose a reason for hiding this comment

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

I think you misunderstood me.
Since torch and torchvision is installed in those image we can remove them from requirements.txt and install only cloudml-hypertune and Pillow. We don't need to separate requirements for CPU and GPU images.
Also, we can remove torch installation from examples/v1beta1/trial-images/darts-cnn-cifar10/requirements.txt

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I see. Thanks.

@tenzen-y tenzen-y force-pushed the upgrade-pytorch-version branch 2 times, most recently from 054c7a8 to de4ef3f Compare March 11, 2024 18:22
Comment on lines +9 to 10
RUN pip install --prefer-binary --no-cache-dir torch==2.2.1 torchvision==0.17.1
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
Copy link
Member Author

Choose a reason for hiding this comment

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

@andreyvelich Does this meet your intention?

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you for this update @tenzen-y!
/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Mar 11, 2024
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich, tenzen-y

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [andreyvelich,tenzen-y]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tenzen-y
Copy link
Member Author

Thank you for this update @tenzen-y! /lgtm /approve

Thank you for the helping!

@tenzen-y
Copy link
Member Author

@andreyvelich Could you restart the "Go Test / Unit Test (1.26.1) (pull_request) "?

@google-oss-prow google-oss-prow bot merged commit 679e6fb into kubeflow:master Mar 12, 2024
59 checks passed
@tenzen-y tenzen-y deleted the upgrade-pytorch-version branch March 12, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants