-
Notifications
You must be signed in to change notification settings - Fork 981
run_jetson.sh error #1706
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
Comments
This problem also appears in the raspberry pi part of that same example. |
I am currently facing the same problem to implement federated learning through flower on my Jetson Nano and Raspberry Pi. Unfortunately I have not found any solution to this problem yet. The error message is as follows: Traceback (most recent call last): |
I've been running into the same issue here: the root cause seems to be this line:
This pip install command lacks quotation marks, so it installs an old version of flwr, and creates a file named "=1.0.0" The proper command should be
|
One workaround is to edit the Dockerfile to install Python3.7 instead, and then either use |
Something like this, added before the pip update line:
|
Now I get this error:
|
This is because installing flwr doesn't install pytorch. pytorch was installed for 3.6, but not 3.7 |
So torchvison and torch must be pip installed as well |
But then I'm not sure the new version of pytorch has GPU access |
cleong110 I followed your recommendations to fix this error and I come across the following:ModuleNotFoundError: No module named 'torch' I installed torch via pip by placing the installation in a RUN command inside the Dockerfile: however it gave an error of not finding the PIL module, so I installed the PIL via pip3 inside the RUN in the Dockerfile, and the following error appeared: Is there any solution? Thanks. |
You are starting down a rabbit hole, I'm afraid. In your case, my suspicion is that (I did confirm that you can One helpful tip for debugging is if you login interactively to the Docker by using something like Then you can manually start a Python shell and try to import torch and see what's wrong. Some things to watch out for:
In your case I would do something like:
and make sure what's installed where. Probably the best thing would be to, instead of using
which guarantees you are using the specific pip which installs packages that python 3.8 can use |
Regarding ParametersRes: that is actually not your fault at all, I believe it is a compatibility issue between versions of |
#1214 in one of the updates, the function was renamed. |
So the embedded example seems to use the old syntax. Your options:
(Edit: another option is to buy one of the newer Jetsons, that can install a newer Jetpack, that can support newer versions of Pytorch and Flower) |
Hi @cleong110 Thanks for your comments on this issue. Is this a problem that you are still experiencing or can we go ahead and close this issue? Have you tried the new example: https://github.com/adap/flower/tree/main/examples/embedded-devices |
Ah, sorry, haven't looked at this in quite a while. Haven't tried the new example, no. |
@WilliamLindskog the new example does look cool. I see it's designed for a Raspberry Pi. We were using various older Jetson modules, have you tested installing on there? Other things to possibly check before closing this issue:
Given that it seems the latest example doesn't use Jetsons and older versions especially can be a bit of a pain, perhaps the answers to both of these could just be "N/A, None", and the issue can be closed. Certainly it would be nice to have an example running on TX2s or Xaviers or Nanos or something, those are exactly the sort of device that it would be really interesting to network together and run Flower on. |
@cleong110 sorry for late reply. Checked out this conversation and seems like it is possible to run "Jetson Orin NX device". #4399 regarding the quotation marks issue, I think that has been resolved in newer versions of Flower. https://github.com/adap/flower/tree/main/examples/embedded-devices You're right that it would be nice to have instructions on how to run on these sort of devices, would you be interested in creating a PR for this? Just like a .md file on how to run on discussed devices? |
I can't do a PR at this time, sorry. Good to hear that those issues have been solved and people have gotten it working! But yes, a .md might be the easiest! Ideally it'd have: (1) install/setup instructions (2) instructions to run a very basic FL experiment on two or more devices! |
Describe the bug
when testing the jetson nano example(https://github.com/adap/flower/tree/main/examples/embedded_devices) and run the
$ ./run_jetson.sh --server_address=<SERVER_ADDRESS> --cid=0 --model=ResNet18. I check the error.
Traceback (most recent call last):
File "./client.py", line 27, in
from flwr.common import (
ImportError: cannot import name 'NDArrays'
I added the flwr path:
/usr/local/lib/python3.6/dist-packages/flwr
/usr/local/lib/python3.6/dist-packages/flwr/common
Some help?
Steps/Code to Reproduce
./run_jetson.sh --server_address=192.168.55.100 --cid=0 --model=ResNet18
Expected Results
Actual Results
=> => naming to docker.io/library/flower_client:latest 0.0s
Traceback (most recent call last):
File "./client.py", line 27, in
from flwr.common import (
ImportError: cannot import name 'NDArrays'
The text was updated successfully, but these errors were encountered: