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

torch 2.x image does not contain dependencies according to requirements/*.txt #2261

Closed
ywchan2005 opened this issue Dec 5, 2023 · 5 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@ywchan2005
Copy link
Contributor

ywchan2005 commented Dec 5, 2023

🐛 Bug

In .azure/gpu-integrations.yml, two different images are used for torch 1.x and 2.x

  • torch 1.x: pytorchlightning/torchmetrics:ubuntu22.04-cuda11.8.0-py3.9-torch1.13
  • torch 2.x: pytorch/pytorch:2.1.1-cuda12.1-cudnn8-runtime

The image used in torch 1.x is built from dockers/ubuntu-cuda/Dockerfile and all required dev packages listed in requirements/_devel.txt are installed in advance

However, the image used in torch 2.x is a vanilla pytorch image which contains no dev packages required to build and test torchmetrics. As a result, even if a package is added in the corresponding .txt file in requirements directory, the image does not pick up the change and fails the build and check

To Reproduce

In my case,

  1. add a new package in a .txt file under requirements directory
  2. update the pull request to trigger the integration check which depends on torch 2.x image
Code sample

e.g. in requirements/image.txt, add kornia >=0.6.7, <0.7.1

Expected behavior

the images install packages according to the .txt files in requirements directory

Environment

  • TorchMetrics version (and how you installed TM, e.g. conda, pip, build from source): 1.3.0dev
  • Python & PyTorch Version (e.g., 1.0): 3.9.18 / 2.1.1+cu121
  • Any other relevant information such as OS (e.g., Linux): Debian GNU/Linux 12 (bookworm)

Additional context

@ywchan2005 ywchan2005 added bug / fix Something isn't working help wanted Extra attention is needed labels Dec 5, 2023
Copy link

github-actions bot commented Dec 5, 2023

Hi! thanks for your contribution!, great first issue!

@Borda Borda self-assigned this Dec 5, 2023
@Borda Borda added question Further information is requested and removed bug / fix Something isn't working labels Dec 5, 2023
@Borda
Copy link
Member

Borda commented Dec 5, 2023

@ywchan2005 thank you for your question; for integration, we would like to use only images with vanilla pytorch. Still, we faced recently breaking changes on Azure DevOps, such as any image used in workflows has to support node 20+, which means Ubuntu 20+, and the needed torch torch1.13 image is based on legacy Ubuntu 18, so we had to replace it...

If you need any rich docker images, please see https://hub.docker.com/r/pytorchlightning/torchmetrics/tags

@ywchan2005
Copy link
Contributor Author

@Borda thanks for the reply. I'm in the middle of a pull request, and struggling how to move forward due to the errors raised in the integration pipeline which blocks the review process.

@Borda
Copy link
Member

Borda commented Dec 5, 2023

I'm in the middle of a pull request, and struggling how to move forward due to the errors raised in the integration pipeline which blocks the review process.

Have you already opened the PR? then we can see together where the problem is...

@ywchan2005
Copy link
Contributor Author

Here's the PR
#2260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants