flower
flower copied to clipboard
ValueError: Object arrays cannot be saved when allow_pickle=False
Describe the bug
Hi I am following the tutorial in https://www.youtube.com/watch?v=cRebUIGB5RU&list=PLNG4feLHqCWlnj8a_E1A_n5zr2-8pafTB i get the following error. I have followed the exact steps from the tutorial to set up the environment.
ERROR flwr 2023-10-30 21:25:32,532 | ray_client_proxy.py:72 | ray::launch_and_get_parameters() (pid=2160, ip=127.0.0.1)
File "python\ray_raylet.pyx", line 640, in ray._raylet.execute_task
File "python\ray_raylet.pyx", line 644, in ray._raylet.execute_task
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\simulation\ray_transport\ray_client_proxy.py", line 136, in launch_and_get_parameters
return maybe_call_get_parameters(
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\client\client.py", line 163, in maybe_call_get_parameters
return client.get_parameters(get_parameters_ins)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\client\app.py", line 284, in _get_parameters
parameters_proto = ndarrays_to_parameters(parameters)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\common\parameter.py", line 28, in ndarrays_to_parameters
tensors = [ndarray_to_bytes(ndarray) for ndarray in ndarrays]
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\common\parameter.py", line 28, in
self.parameters = self._get_initial_parameters(timeout=timeout)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\server\server.py", line 276, in _get_initial_parameters
get_parameters_res = random_client.get_parameters(ins=ins, timeout=timeout)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\simulation\ray_transport\ray_client_proxy.py", line 73, in get_parameters
raise ex
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\simulation\ray_transport\ray_client_proxy.py", line 70, in get_parameters
res = ray.get(future_paramseters_res, timeout=timeout)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\ray_private\client_mode_hook.py", line 105, in wrapper
return func(*args, **kwargs)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\ray\worker.py", line 1763, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): ray::launch_and_get_parameters() (pid=2160, ip=127.0.0.1)
File "python\ray_raylet.pyx", line 640, in ray._raylet.execute_task
File "python\ray_raylet.pyx", line 644, in ray._raylet.execute_task
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\simulation\ray_transport\ray_client_proxy.py", line 136, in launch_and_get_parameters
return maybe_call_get_parameters(
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\client\client.py", line 163, in maybe_call_get_parameters
return client.get_parameters(get_parameters_ins)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\client\app.py", line 284, in _get_parameters
parameters_proto = ndarrays_to_parameters(parameters)
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\common\parameter.py", line 28, in ndarrays_to_parameters
tensors = [ndarray_to_bytes(ndarray) for ndarray in ndarrays]
File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\flwr\common\parameter.py", line 28, in
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Also, I cannot join the slack channel.
Steps/Code to Reproduce
Environment: Windows 11
Expected Results
The stimulation should run
Actual Results
The stimulation fails
Please update the slack channel link
Have you been able to solve the issue? I am getting the same error on windows 11 and linux (centos7). https://github.com/Emmaka9/federated_learning_experiments/blob/main/flower_with_paillier_enc/output_flwr_cifar10_paillier-500100.out
array, allow_pickle=False) # type: ignore File "<array_function internals>", line 200, in save File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\numpy\lib\npyio.py", line 522, in save format.write_array(fid, arr, allow_pickle=allow_pickle, File "C:\Users\rohit\anaconda3\envs\flower\lib\site-packages\numpy\lib\format.py", line 707, in write_array raise ValueError("Object arrays cann
pickle.dump(results, h, protocol=pickle.HIGHEST_PROTOCOL)