Skip to content

How can we ensure that the special_key and special_value can be correctly configured for a specific client? #5145

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

Closed
WLBRich opened this issue Mar 20, 2025 · 1 comment

Comments

@WLBRich
Copy link

WLBRich commented Mar 20, 2025

What is your question?

IIn the Docs, "Customizing Client Configurations"
In some cases, it may be necessary to send different configurations to individual clients. To achieve this, you can create a custom strategy by extending a built-in one, such as FedAvg:

Example: Client-Specific Configuration

from flwr.server.strategy import FedAvg

class CustomClientConfigStrategy(FedAvg):
def configure_fit(self, server_round, parameters, client_manager):
client_instructions = super().configure_fit(
server_round, parameters, client_manager
)

    # Modify configuration for a specific client
    client_proxy, fit_ins = client_instructions[0]
    fit_ins.config["special_key"] = "special_value"

    return client_instructions

How can we ensure that the special_key and special_value can be correctly configured for a specific client? Relying solely on client_instructions[0] is insufficient to determine which client exactly the [0] represents.

@WLBRich WLBRich changed the title How can we ensure that the special_key and special_value can be correctly configured for a specific client? Relying solely on client_instructions[0] is insufficient to determine which client exactly the [0] represents. How can we ensure that the special_key and special_value can be correctly configured for a specific client? Mar 20, 2025
@WilliamLindskog
Copy link
Contributor

Hi @WLBRich,

Thanks for raising this. This has been raised before and we will look at it in April, after our AI Summit which is next week.

We're aiming to reduce the number of issues and will definitely look at this in the coming week(s).

Closing it for now.

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

No branches or pull requests

2 participants