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

Add Flower Client App connection error handling #2969

Merged
merged 39 commits into from Mar 5, 2024

Conversation

charlesbvll
Copy link
Member

@charlesbvll charlesbvll commented Feb 17, 2024

Issue

Description

When starting a long-running Flower client app, if anything interrupts the connection between the server and the client, the client will crash (making it not so long running...).

Related issues/PRs

N/A

Proposal

Explanation

Use the existing RetryInvoker class to wrap the communication function calls in order to catch any communication error and retry to call the given function after some time.

Checklist

  • Implement proposed change
  • Update the changelog entry below
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Changelog entry

The flower-client-app will now try to reconnect indefinitely to the flower-superlink in case of connection error. The arguments --max-retries and --max-wait-time can now be passed to the flower-client-app, --max-retries will define the number of tentatives the client should make before it gives up trying to reconnect to the Superlink, and, --max-wait-time defines the time before the client gives up trying to reconnect to the Superlink.

Any other comments?

N/A

@charlesbvll charlesbvll changed the title Add client connection retry handling Add Flower Client App connection retry handling Feb 18, 2024
@charlesbvll charlesbvll changed the title Add Flower Client App connection retry handling Add Flower Client App connection error handling Feb 18, 2024
@charlesbvll charlesbvll marked this pull request as ready for review February 18, 2024 18:34
@adap adap deleted a comment from notion-workspace bot Feb 20, 2024
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
src/py/flwr/client/app.py Outdated Show resolved Hide resolved
@charlesbvll charlesbvll enabled auto-merge (squash) March 5, 2024 21:35
@charlesbvll charlesbvll merged commit 1298298 into main Mar 5, 2024
28 checks passed
@charlesbvll charlesbvll deleted the client-connection-retry branch March 5, 2024 21:43
tanertopal added a commit that referenced this pull request Mar 6, 2024
* 'flwr_run' of github.com:adap/flower:
  Add `LegacyMessageType` (#3064)
  Add `MessageType` (#3005)
  Add Flower Client App connection error handling (#2969)
  Refactor `app_dir` arguments (#3061)
  Add InnerDirichletPartitioner (#2794)
  Add NumPy template to new command (#3059)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants