Refactor `FederatedServer` by introducing `FLRunConfig`.
* Add `declearn.main.config` submodule: - Move dataclasses (`TrainingConfig`, `EvaluateConfig` and `RegisterConfig`) to this new submodule. - Implement `FLRunConfig`, that binds together all arguments and hyper-parameters used by the `FederatedServer.run` method, and provides with the possibility to write them up as a TOML config file (by inheriting `declearn.utils.TomlConfig`). * Deploy `FLRunConfig` to `FederatedServer`: - Replace the argument to `run` and `async_run` by `FLRunConfig`, adding the possibility to either provide (legacy-style) kwargs or the path to a TOML file to the `run` one. - Replace the argument to `initialize` by the full `FLRunConfig`, to facilitate overriding by subclasses that may need to send or use information on the process in addition to conducting client registration. - Preserve the use of targetted fields of hyper-parameters in the `training_round` and `evaluation_round` methods.
parent
e85d1184
No related branches found
No related tags found
Showing
- README.md 15 additions, 6 deletionsREADME.md
- declearn/main/__init__.py 1 addition, 0 deletionsdeclearn/main/__init__.py
- declearn/main/_server.py 50 additions, 84 deletionsdeclearn/main/_server.py
- declearn/main/config/__init__.py 19 additions, 0 deletionsdeclearn/main/config/__init__.py
- declearn/main/config/_dataclasses.py 0 additions, 0 deletionsdeclearn/main/config/_dataclasses.py
- declearn/main/config/_run_config.py 106 additions, 0 deletionsdeclearn/main/config/_run_config.py
- declearn/main/utils/__init__.py 0 additions, 1 deletiondeclearn/main/utils/__init__.py
- examples/heart-uci/server.py 6 additions, 4 deletionsexamples/heart-uci/server.py
- test/test_main.py 6 additions, 5 deletionstest/test_main.py
Loading