Skip to content

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 and others added 4 commits March 22, 2023 15:43
Signed-off-by: KumoLiu <yunl@nvidia.com>
Signed-off-by: KumoLiu <yunl@nvidia.com>
Signed-off-by: KumoLiu <yunl@nvidia.com>
KumoLiu added 2 commits March 22, 2023 16:08
Signed-off-by: KumoLiu <yunl@nvidia.com>
@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!

Signed-off-by: KumoLiu <yunl@nvidia.com>
@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 <kevlu@nvidia.com>
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