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

Pytorch example simulation from Youtube not working #3574

Open
sargamg99 opened this issue Jun 11, 2024 · 0 comments
Open

Pytorch example simulation from Youtube not working #3574

sargamg99 opened this issue Jun 11, 2024 · 0 comments
Labels
question Further information is requested

Comments

@sargamg99
Copy link

sargamg99 commented Jun 11, 2024

What is your question?

I have tried the Youtube simulation code for Flower. everything seems to work fine but there is an error popping up for simulation. Kindly help me resolve it.

INFO flwr 2024-06-11 11:02:13,240 | server.py:86 | Initializing global parameters
[2024-06-11 11:02:13,240][flwr][INFO] - Initializing global parameters
INFO flwr 2024-06-11 11:02:13,240 | server.py:273 | Requesting initial parameters from one random client
[2024-06-11 11:02:13,240][flwr][INFO] - Requesting initial parameters from one random client
ERROR flwr 2024-06-11 11:02:17,143 | ray_client_proxy.py:72 | ray::launch_and_get_parameters() (pid=3319891, ip=130.236.103.153)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 135, in launch_and_get_parameters
client: Client = _create_client(client_fn, cid)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 168, in _create_client
client_like: ClientLike = client_fn(cid)
File "/home/x_sgupt/client.py", line 55, in client_fn
return FlowerClient(trainloader=trainloaders[int(cid)],
TypeError: FlowerClient() takes no arguments
[2024-06-11 11:02:17,143][flwr][ERROR] - ray::launch_and_get_parameters() (pid=3319891, ip=130.236.103.153)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 135, in launch_and_get_parameters
client: Client = _create_client(client_fn, cid)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 168, in _create_client
client_like: ClientLike = client_fn(cid)
File "/home/x_sgupt/client.py", line 55, in client_fn
return FlowerClient(trainloader=trainloaders[int(cid)],
TypeError: FlowerClient() takes no arguments
Error executing job with overrides: []
Traceback (most recent call last):
File "/home/x_sgupt/main.py", line 33, in main
history = fl.simulation.start_simulation(
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/app.py", line 197, in start_simulation
hist = _fl(
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/server/app.py", line 217, in _fl
hist = server.fit(num_rounds=config.num_rounds, timeout=config.round_timeout)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/server/server.py", line 87, in fit
self.parameters = self._get_initial_parameters(timeout=timeout)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/server/server.py", line 276, in _get_initial_parameters
get_parameters_res = random_client.get_parameters(ins=ins, timeout=timeout)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 73, in get_parameters
raise ex
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 70, in get_parameters
res = ray.get(future_paramseters_res, timeout=timeout)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper
return func(*args, **kwargs)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/ray/worker.py", line 1763, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(TypeError): ray::launch_and_get_parameters() (pid=3319891, ip=130.236.103.153)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 135, in launch_and_get_parameters
client: Client = _create_client(client_fn, cid)
File "/home/x_sgupt/.conda/envs/flower_tutorial/lib/python3.8/site-packages/flwr/simulation/ray_transport/ray_client_proxy.py", line 168, in _create_client
client_like: ClientLike = client_fn(cid)
File "/home/x_sgupt/client.py", line 55, in client_fn
return FlowerClient(trainloader=trainloaders[int(cid)],
TypeError: FlowerClient() takes no arguments

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

@sargamg99 sargamg99 added the question Further information is requested label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant