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

[WIP] add FLStatsHandler #6220

Closed
wants to merge 9 commits into from

Conversation

KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented Mar 22, 2023

Fixes # .

Description

add FLStatsHandler for NVFlare.
It mainly call _add in AnalyticsSender.
https://github.com/NVIDIA/NVFlare/blob/b0de532fc2f65de30eb8af728561bab33fdaf076/nvflare/app_common/widgets/streaming.py#L97

Since AnalyticsSender can only send to FLStatsHandler after instantiated, I add it to ignite.engine.state as a workaround.

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.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Mar 22, 2023

Hi @Nic-Ma @wyli @holgerroth @YuanTingHsieh, could you please help review it first. Not sure if this workaround is acceptable, if so then I could add unittest.

I have tested it locally with this example in NVFlare repo.

Thanks in advance!

docs/source/handlers.rst Outdated Show resolved Hide resolved
Signed-off-by: KumoLiu <[email protected]>
@Nic-Ma Nic-Ma requested a review from wyli March 22, 2023 08:18
Comment on lines +38 to +40
class FLStatsHandler:
"""
FLStatsHandler defines a set of Ignite Event-handlers for all the NVFlare ``AnalyticsSender`` logics.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just from a naming point of view, do we want this to be called FLStatsHandler or NVFlareStatsHandler?

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Mar 28, 2023

Update: Waiting for @chesterxgchen and @holgerroth to discuss a proposal.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Aug 30, 2023

The changes in this PR have been included in NVIDIA/NVFlare#1925.
Closed for now.

@KumoLiu KumoLiu closed this Aug 30, 2023
wyli pushed a commit that referenced this pull request Sep 13, 2023
PR #6220 was closed and NVFlareStatsHandler has now been implemented in
NVFlare in NVIDIA/NVFlare#1925. However, there
is still the piece in MonaiAlgo to attach the stats_sender in
initialize, so this PR adds that missing piece.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Kevin <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

3 participants