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

Pytorch not importing #5659

Closed
dweisz opened this issue Apr 4, 2024 · 8 comments · Fixed by #5660
Closed

Pytorch not importing #5659

dweisz opened this issue Apr 4, 2024 · 8 comments · Fixed by #5660
Assignees
Labels

Comments

@dweisz
Copy link

dweisz commented Apr 4, 2024

Bug description

pytorch is installed on astro.datahub. However, we try to import it, we get the below error (see screenshot). Re-installing pytorch via conda or pip doesn't seem to resolve the issue. Any guidance is appreciated.

Screen Shot 2024-04-04 at 11 49 06 AM

Environment & setup

  • Hub: AstroHub
  • Language: Python

How to reproduce

import torch

@shaneknapp
Copy link
Contributor

shaneknapp commented Apr 4, 2024 via email

@shaneknapp
Copy link
Contributor

hmm, looks like this is a pytorch issue: pytorch/pytorch#123097

i'll see if i can't make this work somehow.

@shaneknapp
Copy link
Contributor

@dweisz could you log in to astro-staging.datahub.berkeley.edu and confirm that it works for you?

image

@dweisz
Copy link
Author

dweisz commented Apr 4, 2024

Unfortunately, it's still throwing me an error

Screen Shot 2024-04-04 at 1 40 48 PM

@balajialg
Copy link
Contributor

balajialg commented Apr 4, 2024

@dweisz Are you logged into https://astro-staging.datahub.berkeley.edu? It works without any errors in Astro-staging hub for me. I can't see your username drweisz listed in the admin interface of staging hub (It should have if you had logged into that hub)

image

@dweisz
Copy link
Author

dweisz commented Apr 4, 2024 via email

@shaneknapp
Copy link
Contributor

shaneknapp commented Apr 4, 2024

Apologies, I was logged into the wrong server. Yes, import torch appears to work on the astro-staging instance.

On Apr 4, 2024, 1:47 PM -0700, Balaji Alwar @.>, wrote: @dweisz Are you logged into https://astro-staging.datahub.berkeley.edu? It works without any errors in Astro-staging hub for me. image.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>

glad this works! we'll get this merged to prod by EOD today

@ElHouas
Copy link

ElHouas commented Apr 5, 2024

Hello @shaneknapp ,

I am experiencing the same issue when installing torch using conda inside a docker container using as base images ubuntu:22 and anaconda official docker image. Here is my env.yaml file:

name: ml_env
channels:

  • pytorch
  • nvidia
  • conda-forge
  • nodefaults
    dependencies:
  • python=3.10.7
  • mamba
  • pip
  • poetry=1.8.2
  • pytorch=2.0.1
  • torchaudio=2.0.2
  • torchvision=0.15.2
  • pytorch-cuda=11.8
  • cudatoolkit=11.8.0
  • cudnn
  • blas=1.0
    platforms:
  • linux-64

Thanks for the help! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants