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

environment.yml pytorch-gpu can be simplified to pytorch to support Macs #293

Closed
RitwikGupta opened this issue Dec 16, 2021 · 2 comments · Fixed by #295
Closed

environment.yml pytorch-gpu can be simplified to pytorch to support Macs #293

RitwikGupta opened this issue Dec 16, 2021 · 2 comments · Fixed by #295
Milestone

Comments

@RitwikGupta
Copy link
Collaborator

Is there a reason why the environment.yml file requires pytorch-gpu>=1.7 rather than just pytorch>=1.7? Should the latter package automatically install GPU support as needed?

The current install fails on Macs since no pytorch-gpu target is available for that platform.

@ashnair1
Copy link
Collaborator

ashnair1 commented Dec 16, 2021

The docs mention switching out pytorch-gpu for pytorch-cpu in this case. Refer here

However I'm curious as to why this method was chosen. If we are considering installing pytorch via conda you have the following options:

  • pytorch-gpu from conda-forge channel supports only Linux
  • pytorch-cpu from conda-forge channel supports macOS and Linux
  • pytorch from conda-forge channel supports macOS and Linux
  • pytorch from pytorch channel supports windows, macOS and Linux

Also environment.yml can't be used to setup a torchgeo environment on Windows due to this. Best bet is to setup a conda environment and then install packages via pip. Should this be mentioned in the docs?

@adamjstewart
Copy link
Collaborator

If I recall, the original reason we went with pytorch-gpu instead of pytorch is because the pytorch package was an older package whose latest version was 1.7 while the pytorch-gpu and pytorch-cpu were kept up-to-date and provided 1.10 versions. However, it seems like this is no longer the case and all three are kept up-to-date. @calebrob6 is this right? When we created a package for torchgeo in conda-forge, they asked us to change it to pytorch for this reason.

Anyone want to make a PR with this change (pytorch-gpu -> pytorch, remove the advice on switching to pytorch-cpu on macOS from the installation docs)? I would like someone to test this and make sure:

  1. The latest version of PyTorch gets installed by default
  2. PyTorch with GPU support gets installed by default on Linux (CPU on macOS)

P.S. we tried using the pytorch channel but ran into a lot of ABI compatibility issues when mixing and matching channels (I'm not a big fan of conda and this is one of the reasons why).

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 a pull request may close this issue.

3 participants