flower
flower copied to clipboard
Insecure gRPC channel closed
Hi, I was just trying the examples on https://github.com/adap/flower/tree/main/examples/simulation_pytorch After running, I got this error: INFO flower 2021-08-22 07:27:50,930 | server.py:306 | Received initial parameters from one random client INFO flower 2021-08-22 07:27:50,931 | server.py:120 | Evaluating initial parameters INFO flower 2021-08-22 07:27:50,931 | server.py:133 | FL starting DEBUG flower 2021-08-22 07:27:50,931 | server.py:251 | fit_round: strategy sampled 2 clients (out of 4) DEBUG flower 2021-08-22 07:27:51,674 | connection.py:68 | Insecure gRPC channel closed Process Process-5: Traceback (most recent call last): File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/Federated_Learning/simulation.py", line 62, in start_client fl.client.start_numpy_client("0.0.0.0:8080", client=CifarClient()) File "/opt/conda/lib/python3.8/site-packages/flwr/client/app.py", line 112, in start_numpy_client start_client( File "/opt/conda/lib/python3.8/site-packages/flwr/client/app.py", line 65, in start_client client_message, sleep_duration, keep_going = handle( File "/opt/conda/lib/python3.8/site-packages/flwr/client/grpc_client/message_handler.py", line 40, in handle return _fit(client, server_msg.fit_ins), 0, True File "/opt/conda/lib/python3.8/site-packages/flwr/client/grpc_client/message_handler.py", line 57, in _fit fit_res = client.fit(fit_ins) File "/opt/conda/lib/python3.8/site-packages/flwr/client/numpy_client.py", line 179, in fit results = self.numpy_client.fit(parameters, ins.config) File "/Federated_Learning/simulation.py", line 52, in fit self.set_parameters(parameters) File "/Federated_Learning/simulation.py", line 49, in set_parameters net.load_state_dict(state_dict, strict=True) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1398, in load_state_dict load(self) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1396, in load load(child, prefix + name + '.') File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1396, in load load(child, prefix + name + '.') File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1392, in load module._load_from_state_dict( File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/batchnorm.py", line 106, in _load_from_state_dict super(_NormBase, self)._load_from_state_dict( File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1332, in _load_from_state_dict input_param = input_param[0] IndexError: index 0 is out of bounds for dimension 0 with size 0
I've changed "0.0.0.0:8080" to localhost:8080 or localhost:5040 but I got some errors. Thanks.
I've changed "0.0.0.0:8080" to localhost:8080 or localhost:5040 but I got some errors. Thanks.
I met the same error with you. The reason for this is that the server was not started before starting the client.
@Nada-Bu is your issue resolved or are you still facing them?
I am facing similar problem. @Nada-Bu Have u solved yours ?