fedn icon indicating copy to clipboard operation
fedn copied to clipboard

KeyError: 'package'

Open nilakandan opened this issue 3 years ago • 2 comments

Severity

  • [*] High (select if the issue affects a major feature and there is no workaround or the available workaround is very complex)

Environment:

  • OS: Windows 10
  • Browser chrome

Reproduction Steps Steps to reproduce the behavior: 1: when I tried executing/Launch the Clients using the following command, docker run -v /absolute-path-to-this-folder/data/clients/0:/app/data:ro -v /absolute-path-to-this-folder/client.yaml:/app/client.yaml --network fedn_default mnist-client fedn run client -in client.yaml --name client0

getting the below error:

Asking for assignment! 02/18/2022 10:23:09 AM [connectionpool.py:1001] Starting new HTTPS connection (1): reducer:8090 2022-02-18 10:23:09,809 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): reducer:8090 02/18/2022 10:23:09 AM [connectionpool.py:456] https://reducer:8090 "GET /assign?name=client0 HTTP/1.1" 200 1707 2022-02-18 10:23:09,845 - urllib3.connectionpool - DEBUG - https://reducer:8090 "GET /assign?name=client0 HTTP/1.1" 200 1707 Traceback (most recent call last): File "/usr/local/bin/fedn", line 33, in sys.exit(load_entry_point('fedn', 'console_scripts', 'fedn')()) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1137, in call return self.main(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1062, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 763, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/app/src/fedn/fedn/cli/run_cmd.py", line 120, in client_cmd client = Client(config) File "/app/src/fedn/fedn/fedn/client.py", line 82, in init client_config = self._attach() File "/app/src/fedn/fedn/fedn/client.py", line 110, in _attach client_config = self._assign() File "/app/src/fedn/fedn/fedn/client.py", line 196, in _assign status, response = self.connector.assign() File "/app/src/fedn/fedn/fedn/common/net/connect.py", line 95, in assign reducer_package = retval.json()['package'] KeyError: 'package'

The entire code was working fine with Docker Desktop. but when tried with WSL 2 (Ubuntu backend) without Docker desktop, getting the above error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Contact Details [email protected]

nilakandan avatar Feb 18 '22 10:02 nilakandan

Thank you for reporting the issue, the Keyerror is most probably due to compute package not being configured. Before you connected the client, did you upload the compute package with the Reducer UI? Alt. if you are using a local compute package then use the flag --local-package when starting the client.

Anyhow we should handle this exception, thank you!

Wrede avatar Feb 18 '22 12:02 Wrede

I am using the default package which is provided here in the repo. Also, Yes, I configured the Reducer with the Compute Package and then triggered the Client. But still getting the same error

nilakandan avatar Feb 24 '22 09:02 nilakandan