GithubHelp home page GithubHelp logo

Comments (4)

jafermarq avatar jafermarq commented on June 11, 2024

Hi @xwang317 , thanks for bringing this up. It seems to happen with more recent versions of Poetry (it doesn't happen with 1.5, but it does with 1.7 or 1.8).
We'll fix this but it is safe to ignore the error. You can activate your environment (via poetry shell) and run the simulation.

from flower.

xwang317 avatar xwang317 commented on June 11, 2024

Hi @xwang317 , thanks for bringing this up. It seems to happen with more recent versions of Poetry (it doesn't happen with 1.5, but it does with 1.7 or 1.8). We'll fix this but it is safe to ignore the error. You can activate your environment (via poetry shell) and run the simulation.

Thank you very much @jafermarq!
I also was not able to run the simulation, here is the error report..
could you help with this if possible? Thank you very much! let me know if I can provide anything.

salmon@satre:~/vertical-fl$ poetry run python3 simulation.py
The currently activated Python version 3.11.5 is not supported by the project (>=3.8,<3.11).
Trying to find and use a compatible version.
Using python3.10 (3.10.12)
Traceback (most recent call last):
File "/home/salmon/.cache/pypoetry/virtualenvs/quickstart-pytorch-yvL9m5xc-py3.10/lib/python3.10/site-packages/torch/init.py", line 174, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File "/usr/lib/python3.10/ctypes/init.py", line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: libcufft.so.11: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/salmon/vertical-fl/simulation.py", line 3, in
from strategy import Strategy
File "/home/salmon/vertical-fl/strategy.py", line 2, in
import torch
File "/home/salmon/.cache/pypoetry/virtualenvs/quickstart-pytorch-yvL9m5xc-py3.10/lib/python3.10/site-packages/torch/init.py", line 234, in
_load_global_deps()
File "/home/salmon/.cache/pypoetry/virtualenvs/quickstart-pytorch-yvL9m5xc-py3.10/lib/python3.10/site-packages/torch/init.py", line 195, in _load_global_deps
_preload_cuda_deps(lib_folder, lib_name)
File "/home/salmon/.cache/pypoetry/virtualenvs/quickstart-pytorch-yvL9m5xc-py3.10/lib/python3.10/site-packages/torch/init.py", line 160, in _preload_cuda_deps
raise ValueError(f"{lib_name} not found in the system path {sys.path}")
ValueError: libcublas.so.*[0-9] not found in the system path ['/home/salmon/vertical-fl', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/salmon/.cache/pypoetry/virtualenvs/quickstart-pytorch-yvL9m5xc-py3.10/lib/python3.10/site-packages']

from flower.

jafermarq avatar jafermarq commented on June 11, 2024

Hi @xwang317 ,
An error is logged right after you start your simulation:

The currently activated Python version 3.11.5 is not supported by the project (>=3.8,<3.11).

It might be fine to skip it but i'm aren't sure. YOu can skip to the part I talk about cuda and see if that fixes your issue:

Specify python version

What you need to do is to have a lower version of Python and tell poetry to use that when building the environment. There are different ways of achieving this. You could first install pyenv (if you haven't already -- i wrote a guide of how to do it here) and then:

pyenv install 3.10.12 # for example (you could use others)

# then you can list all your versions (to see what's available in your system)
pyenv versions # you should see 3.10.12 (and potentially others)

# go to the example directory
cd flower/examples/vertical-fl

# set to use the python version just installed
pyenv local 3.10.12
poetry env use 3.10.12

# finally install
poetry install

# then activate
poetry shell

# then you can run the example
python simulation.py

That should fix that error at the beginning.

Missing CUDA packages

regarding the Cuda error... for some reason some auxiliary packages that come with torch/torchvision don't get pulled & installed with Poetry (they are installed just fine via standard pip). In the mean time, you can simply do the following after activating your environment via poetry shell:

# this will only install the missing packages
pip install -r requirements.txt

Hope this helps

from flower.

xwang317 avatar xwang317 commented on June 11, 2024

Hi @xwang317 , An error is logged right after you start your simulation:

The currently activated Python version 3.11.5 is not supported by the project (>=3.8,<3.11).

It might be fine to skip it but i'm aren't sure. YOu can skip to the part I talk about cuda and see if that fixes your issue:

Specify python version

What you need to do is to have a lower version of Python and tell poetry to use that when building the environment. There are different ways of achieving this. You could first install pyenv (if you haven't already -- i wrote a guide of how to do it here) and then:

pyenv install 3.10.12 # for example (you could use others)

# then you can list all your versions (to see what's available in your system)
pyenv versions # you should see 3.10.12 (and potentially others)

# go to the example directory
cd flower/examples/vertical-fl

# set to use the python version just installed
pyenv local 3.10.12
poetry env use 3.10.12

# finally install
poetry install

# then activate
poetry shell

# then you can run the example
python simulation.py

That should fix that error at the beginning.

Missing CUDA packages

regarding the Cuda error... for some reason some auxiliary packages that come with torch/torchvision don't get pulled & installed with Poetry (they are installed just fine via standard pip). In the mean time, you can simply do the following after activating your environment via poetry shell:

# this will only install the missing packages
pip install -r requirements.txt

Hope this helps

Thank you so much @jafermarq ! It works now!

from flower.

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.