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 Client Metadata Transmission in gRPC Communication #4339

Open
kuchidareo opened this issue Oct 17, 2024 · 0 comments
Open

Add Client Metadata Transmission in gRPC Communication #4339

kuchidareo opened this issue Oct 17, 2024 · 0 comments
Labels
feature request This issue or comment suggests an additional feature. part: communication Issues/PRs that affect federated communication e.g. gRPC. stale If issue/PR hasn't been updated within 3 weeks.

Comments

@kuchidareo
Copy link

kuchidareo commented Oct 17, 2024

Describe the type of feature and its functionality.

To enhance federated learning (FL) using gRPC communication, this feature will enable the transmission of client metadata to the ClientProxy, such as CPU and memory specifications. This addition will allow the client_manager to selectively choose clients based on device capability, enabling optimized FL strategies, including heterogeneous federated learning (heteroFL), by making better use of diverse device capacities.

Describe step by step what files and adjustments are you planning to include.

  1. Add a new attribute to the FlowerServiceStub.Join function (a grpc._StreamStreamMultiCallable class). This function has a metadata attribute in its call function. We will retrieve this data on the server side using the invocation_metadata function. The affected files will be:
  • client.grpc_client.connection.py
  • server.superlink.fleet.grpc_bidi.flower_service_servicer.py
  1. Modify the attributes of other transport types for compatibility with the API. This is mainly for consistency across transport methods. The affected file will be:
  • client.app.py
  1. Register the metadata to the GrpcClientProxy as a class attribute during initialization. This will allow the server to store and use client metadata effectively. The affected files will be:
  • server.superlink.fleet.grpc_bidi.flower_service_servicer.py
  • server.superlink.fleet.grpc_bidi.grpc_client_proxy.py
  1. Add documentation in the docstrings to explain the new metadata handling and how it integrates with the existing functionality.

Is there something else you want to add?

No response

@kuchidareo kuchidareo added the feature request This issue or comment suggests an additional feature. label Oct 17, 2024
@WilliamLindskog WilliamLindskog added stale If issue/PR hasn't been updated within 3 weeks. part: communication Issues/PRs that affect federated communication e.g. gRPC. labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request This issue or comment suggests an additional feature. part: communication Issues/PRs that affect federated communication e.g. gRPC. stale If issue/PR hasn't been updated within 3 weeks.
Projects
None yet
Development

No branches or pull requests

2 participants