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

Dynamic timeout settings #3234

Open
jmsw4bn opened this issue Apr 6, 2024 · 0 comments
Open

Dynamic timeout settings #3234

jmsw4bn opened this issue Apr 6, 2024 · 0 comments
Labels
feature request This issue or comment suggests an additional feature.

Comments

@jmsw4bn
Copy link

jmsw4bn commented Apr 6, 2024

Describe the type of feature and its functionality.

Various timeout scenarios arise during the federated learning process.
Therefore, dynamically allowing each round to have different timeout would be a significant improvement.

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

When starting a server using the function "flwr.server.start_server", the config can be set with a round_timeout value.
However, this timeout value is fixed for all rounds needed to be performed.
For example, there are 10 rounds, if the timeout is 20 seconds, each of the 10 rounds will end if 20 seconds are passed.
Can I dynamically set the timeout for each round, such as 20 seconds for the 1st round, 39 seconds for the 2nd round, etc.?

I revised the codes in "server.py", by changing the parameters passed to the function "fit(self, num_rounds: int, timeout: Optional[float]) -> Tuple[History, float]".
Specifically, I pass the "config" to the function rather than the fixed "timeout" (timeout = config.round_timeout).
Therefore, the timeout is set for each round, according to the "config".

Because the "config" can be easily adjusted, the timeout can be adjusted dynamically.
For example, in the following codes, I can dynamically change the "round_timeout" value for "server_config".
If the timeout is set with "config.round_timeout", it also can have different timeout for different rounds.

client_manager = SimpleClientManager()
server = Server(client_manager=client_manager, strategy=strategy)
server_config = fl.server.ServerConfig(num_rounds=num_rounds, round_timeout=60)
fl.server.start_server(server=server, config=server_config)

However, it introduced some connection problems, and the clients will exist when timeout occurs.

Therefore, I hope you can consider this feature and implement it well.

Is there something else you want to add?

No response

@jmsw4bn jmsw4bn added the feature request This issue or comment suggests an additional feature. label Apr 6, 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.
Projects
None yet
Development

No branches or pull requests

1 participant