-
Notifications
You must be signed in to change notification settings - Fork 358
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
Mamba does not respect Pytorch's cpuonly #336
Comments
Thanks @alanhdu for opening this issue. Indeed, mamba doesn't respect the cpuonly package in the same way as conda does it. The cpuonly is implemented using track_features and the corresponding package for pytorch carries the same feature. That mechanism has basically been deprecated by conda and e.g. conda-forge uses mutex packages mostly now. I am not sure if we should attempt to support track_features with mamba. As far as I am aware there are some strong drawbacks, and mutex packages are comparatively simple. Maybe we can convince the pytorch maintainers to switch? cc @SylvainCorlay @xhochy what do you think? |
Quoting from this blog post: https://www.anaconda.com/blog/understanding-and-improving-condas-performance
|
I think that it would be the most reasonable approach since this is deprecated in conda. |
Here is a google drive doc from Mike Saharan (I believe) describing mutex packages very well: https://docs.google.com/document/d/1S2D4lTYfDV4GNGbRSDWobH2PWilUVXTHRgl-2tnzdxY |
I opened a bug report on pytorch. I guess this will take a while to materialize... |
Work in progress: pytorch/builder#488 |
Are there any workarounds for this in the meantime? |
I worked around it by explicitly fetching PyTorch and friends using the CPU-based package build string, e.g. from my
|
finally the latest PR was merged and pytorch has started to use |
Note that it's not yet rolled out to the |
Thanks @rgommers, good to know! |
Sorry to be a bother, but I have the opposite problem: I can't for the life of me get pytorch's cuda version installed with mamba :/ Any idea? |
Which channel are you using, |
Thanks Ivan!
Which channel are you using, pytorch, pytorch-nightly or conda-forge? Is
it the case that mamba install -c pytorch -c nvidia pytorch doesn't
install the CUDA build of PyTorch for you? Could you try running the
command in a fresh environment or restricting the build with mamba
install -c pytorch -c nvidia pytorch=*=*cuda*
I'm using the `pytorch` channel, on a fresh environment with python=3.8.
This instals the build py3.8_cpu_0 of pytorch.
Restricting the build gives me "Nothing provides requested pytorch *cuda*"
when running:
` mamba install pytorch=*cuda* -c pytorch -c nvidia`
With `conda` instead of `mamba`, however, I am getting the proper cuda
build.
I do have four GPUs, GTX 1080 with Driver 460.91.03 and Cuda 11.2.
Thanks for any more suggestions, happy to try any suggestion you send!
|
@jucor can you share more of you system?
|
Ah, sorry, the proper syntax is
So use |
Awesome, `pytorch=*=*cuda` did the trick! Thank you very much!
And on the environment,
- Ubuntu 20.04.2 LTS
- mamba 0.15.3
- conda info output:
```
(superres_redone_mamba) ***@***.***:version_17 (highres-net *>)$
conda info
active environment : superres_redone_mamba
active env location :
/mnt/mirrored/home/julien/mambaforge/envs/superres_redone_mamba
shell level : 4
user config file : /mnt/mirrored/home/julien/.condarc
populated config files : /mnt/mirrored/home/julien/mambaforge/.condarc
/mnt/mirrored/home/julien/.condarc
conda version : 4.10.3
conda-build version : not installed
python version : 3.9.6.final.0
virtual packages : __cuda=11.2=0
__linux=5.4.0=0
__glibc=2.31=0
__unix=0=0
__archspec=1=x86_64
base environment : /mnt/mirrored/home/julien/mambaforge (writable)
conda av data dir : /mnt/mirrored/home/julien/mambaforge/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/pytorch/linux-64
https://conda.anaconda.org/pytorch/noarch
https://conda.anaconda.org/nvidia/linux-64
https://conda.anaconda.org/nvidia/noarch
https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /mnt/mirrored/home/julien/mambaforge/pkgs
/mnt/mirrored/home/julien/.conda/pkgs
envs directories : /mnt/mirrored/home/julien/mambaforge/envs
/mnt/mirrored/home/julien/.conda/envs
platform : linux-64
user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.6
Linux/5.4.0-72-generic ubuntu/20.04.2 glibc/2.31
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
|
Can you add |
Oh never mind I misread that. I've deleted my previous comment because I'm actually trying to install the cpuonly version. How to use the mutex package? Should I still declare
But I cannot install the cpu-only version using mamba from my environment.yaml. Any ideas? EDIT: Actually it's installing both |
Here's a simple name: pytorch-cpuonly
channels:
- pytorch
- defaults
dependencies:
- python=3
- pytorch
- cpuonly Having I think it's better to ask these kind of questions on PyTorch Forum https://discuss.pytorch.org/, where you're likely to receive a quick response. This issue is closed as the original problem is resolved. If you think that there's a bug in Mamba feel free to open a new issue. |
I got pointed here from an other post. Using the conda-forge channel, there is no |
To install PyTorch without CUDA, the official docs recommend installing a special
cpuonly
package (see https://pytorch.org/): that is, we can do something likeconda create -n test -c pytorch python=3 pytorch=1.5 cpuonly
.But on Mamba, this will create an environent that installs both
cpuonly
andcudatoolkit
(and installs a Pytorch version that depends on CUDA):I'm on Fedora 31 and the latest conda + mamba version.
The text was updated successfully, but these errors were encountered: