GithubHelp home page GithubHelp logo

Comments (5)

lmaxeniro avatar lmaxeniro commented on April 28, 2024 1

OK, I had completely removed my conda env and re-install for fedscope--this time I get the cudatoolkit 11.3.1 installed. then the demo project can be run up without problem.

from federatedscope.

yxdyc avatar yxdyc commented on April 28, 2024

Thanks for your attention!
The problem Torch not compiled with CUDA enabled occurs when the cuda and torch versions mismatch. To fix it, you may need to re-set the conda env and install torch from a version-fixed wheel (see similar solutions here). Any other suggestions @rayrayraykk ?

from federatedscope.

rayrayraykk avatar rayrayraykk commented on April 28, 2024

It looks like it is caused by not installing pytorch correctly.

Here are 2 possible solutions:

  1. Downgrade your CUDA version to 11.3.
  2. Install pytorch manually via pip install torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu116. For more details, see: https://discuss.pytorch.org/t/pytorch-cuda-11-6/149647.

from federatedscope.

lmaxeniro avatar lmaxeniro commented on April 28, 2024

Hi, Thanks for the reply.

I don't want to change my CUDA version as this is OK for my other project.. So I simply reinstall the torch, as reported as below it is success:

pip install torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu116
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://download.pytorch.org/whl/nightly/cu116
Requirement already satisfied: torch in /home/liangma/miniconda3/envs/fedscope/lib/python3.9/site-packages (1.11.0)
Requirement already satisfied: typing-extensions in /home/liangma/miniconda3/envs/fedscope/lib/python3.9/site-packages (from torch) (4.2.0)

My torch version is 1.11.0 now but I still get the same error report when running the demo project.

When I checked the torch version-- I find that what is installed are pytorch (which is from the requirement.txt) but not torch, and my pytorch is likely "cpu_only". Does that explain the why problem happen?

$ conda list | grep torch:
cpuonly                   2.0                           0    pytorch
ffmpeg                    4.3                  hf484d3e_0    pytorch
pyg                       2.0.4           py39_torch_1.10.0_cpu    pyg
pytorch                   1.10.1              py3.9_cpu_0    pytorch
pytorch-cluster           1.6.0           py39_torch_1.10.0_cpu    pyg
pytorch-mutex             1.0                         cpu    pytorch
pytorch-scatter           2.0.9           py39_torch_1.10.0_cpu    pyg
pytorch-sparse            0.6.13          py39_torch_1.10.0_cpu    pyg
pytorch-spline-conv       1.2.1           py39_torch_1.10.0_cpu    pyg
torch                     1.11.0                   pypi_0    pypi
torchaudio                0.10.1                 py39_cpu  [cpuonly]  pytorch
torchtext                 0.11.1                     py39    pytorch
torchvision               0.11.2                 py39_cpu  [cpuonly]  pytorch



from federatedscope.

yxdyc avatar yxdyc commented on April 28, 2024

Hi, Thanks for the reply.

I don't want to change my CUDA version as this is OK for my other project.. So I simply reinstall the torch, as reported as below it is success:

pip install torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu116
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://download.pytorch.org/whl/nightly/cu116
Requirement already satisfied: torch in /home/liangma/miniconda3/envs/fedscope/lib/python3.9/site-packages (1.11.0)
Requirement already satisfied: typing-extensions in /home/liangma/miniconda3/envs/fedscope/lib/python3.9/site-packages (from torch) (4.2.0)

My torch version is 1.11.0 now but I still get the same error report when running the demo project.

When I checked the torch version-- I find that what is installed are pytorch (which is from the requirement.txt) but not torch, and my pytorch is likely "cpu_only". Does that explain the why problem happen?

$ conda list | grep torch:
cpuonly                   2.0                           0    pytorch
ffmpeg                    4.3                  hf484d3e_0    pytorch
pyg                       2.0.4           py39_torch_1.10.0_cpu    pyg
pytorch                   1.10.1              py3.9_cpu_0    pytorch
pytorch-cluster           1.6.0           py39_torch_1.10.0_cpu    pyg
pytorch-mutex             1.0                         cpu    pytorch
pytorch-scatter           2.0.9           py39_torch_1.10.0_cpu    pyg
pytorch-sparse            0.6.13          py39_torch_1.10.0_cpu    pyg
pytorch-spline-conv       1.2.1           py39_torch_1.10.0_cpu    pyg
torch                     1.11.0                   pypi_0    pypi
torchaudio                0.10.1                 py39_cpu  [cpuonly]  pytorch
torchtext                 0.11.1                     py39    pytorch
torchvision               0.11.2                 py39_cpu  [cpuonly]  pytorch

It seems that you faced the problem with cpu-version as others met. You can try this solution to re-install torch.

from federatedscope.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.