-
Notifications
You must be signed in to change notification settings - Fork 881
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
Expose gRPC parameters in start_client() and start_numpy_client() #1115
Conversation
Arguments of the call to class grpc.StreamStreamMultiCallable can be passed in grpc_args and grpc_kwargs. These are timeout, metadata, credentials, wait_for_ready and compression (https://grpc.github.io/grpc/python/grpc.html?highlight=wait_for_ready#grpc.StreamStreamMultiCallable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the introduction of gRPC wait_for_ready
to improve connection robustness, but would change the interface to not leak the client abstraction.
Thanks for the PR @g-pichler ! Would there be any downsides to generally setting |
The current PR looks good to me though, I wouldn't mind exposing this to the user if it provides value. |
@danieljanes the client currently fails if a connection to the server cannot be established. With |
@danieljanes Not sure what you're alluding to? Exposing the |
I think that in general users expect a client to terminate if a connection to the server cannot be established. Setting I am currently dealing with a situation where I need to spawn many clients and servers in separate threads to test many runs of a federated learning system. Typically the client starts quicker than the server process. So, exposing this flag provides a lot of value. |
@orlandohohmeier 3761f5e changed the user-facing API to expose @g-pichler thanks for the context, makes sense |
To follow up: Are the more changes necessary or are you planning to merge this PR? |
Arguments of the call to class grpc.StreamStreamMultiCallable can be passed in grpc_args and grpc_kwargs. These are timeout, metadata, credentials, wait_for_ready and compression (https://grpc.github.io/grpc/python/grpc.html?highlight=wait_for_ready#grpc.StreamStreamMultiCallable).
What does this implement/fix? Explain your changes.
This change exposes the parameters for gRPC (used by flower under the hood) to the user. I use this to set wait_for_ready=True to ensure that a client waits until a server is up.