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

Simplified federated statistics workflow, Streaming federated statistics and code refactoring #2265

Closed
wants to merge 19 commits into from

Conversation

chesterxgchen
Copy link
Collaborator

@chesterxgchen chesterxgchen commented Jan 7, 2024

Description

This PR is built on top of this PR: #2250. So it must be add after that PR is merged.
The main changes

1, Refactory Statistics_executor to allow the input to be pure Dictionary sharable or DXO converted Shareable
as FLModel convert to shareable involves DXO embedded inside the Shareable;
Fed Stats controller did not use DXO for input shareable
2. Fix FLModelUtils paramsTypoe checking. instead of raise Exception when params type is None, it should use FULL type when the params is not None
3. Refactforing the codebase. Many of the fed stats calculations are now placed to fed_stats_utils.py, both statistics_controller.py and the new simplified FedStatistics workflow can share the code. Both produced the same result.

A few sentences describing the changes proposed in this pull request.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

… into some utils class

2. Refactoring the WFController class into BaseWFController class and WFController class. The BaseWFController has majority of the logics and implement ControllerSpec. But not implement Responder, which is needed for Server-side controller.  WFController Inherited both BaseWFController and Controller. This allows BaseWFController be able to be used on the client-side controller logics without implementing control_flow() method
2. add late result handling
3. change the API spec to allow get result one at a time
…nary sharable or DXO converted Sharable

   as FLModel convert to shareable involves DXO, Fed Stats controller did not use DXO for input sharable
2. Fix FLModelUtils paramsTypoe checking, instread of raise Exception when params type is None, it should use FULL type when the params is not None
3. refactfore the code base many of the fed stats calculation is placed to fed_stats_utils.py, both statistics_controller.py and FedStatistics workflow can share
5. make the fed stats workflow streamable job.
@chesterxgchen chesterxgchen marked this pull request as draft January 7, 2024 06:03
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

Successfully merging this pull request may close these issues.

None yet

1 participant