Revise `Checkpointer`.
This MR aims at revising the Checkpointer
class implemented under declearn.main.utils
.
It was initiated by @nbigaud as an extension to his effort to implement Optimizer.get_state
and Optimizer.set_state
(see MR !19 (merged)). It also aims at handling the newly-added evaluation metrics modularly computed during the FL process (see MR !20 (merged)).
Workflow:
- This MR will start with a review of the (squashed and partially cleaned) implementation made by Nathan.
- Some revisions might be implemented, notably to:
- Alter the handling of the
checkpoint=None
case (absence of a folder where to save results). - Possibly refactor the code, either within the class, or between
Checkpointer
,Model
andOptimizer
.
- Alter the handling of the
- A revision of the metrics-saving process will be implemented.
- A revision of the use of the checkpointer in
FederatedServer
andFederatedClient
will be conducted. - Prospective features and known limitations will be documented into a dedicated issue, for future enhancements.
Tasklist:
-
Rework the first draft of the revision done by @nbigaud -
Add metrics-saving and -loading methods compatible with the Metrics API -
Revise Checkpointer
instantiation as part ofFederatedServer
andFederatedClient
-
Update FederatedServer
andFederatedClient
backend to save all metrics