Skip to content

How to set aggregation weights #1911

Closed Answered by ZiyueXu77
wanderine asked this question in Q&A
Discussion options

You must be logged in to vote

With the default learner/aggregator, the aggr weights are set to the number of traning samples, by transfering the below MetaKey in the local learner ("MetaKey.NUM_STEPS_CURRENT_ROUND") in
https://github.com/NVIDIA/NVFlare/blob/main/examples/hello-world/hello-pt/jobs/hello-pt/app/custom/cifar10trainer.py#L145

To clarify, the "aggregation_weights" in the config json is in fact an "additional weight", that can be further set as
https://github.com/NVIDIA/NVFlare/blob/main/examples/hello-world/hello-pt/jobs/hello-pt/app/config/config_fed_server.json#L25C1-L27C24

And the two will be multiplied in the server aggregator as
https://github.com/NVIDIA/NVFlare/blob/main/nvflare/app_common/aggregator…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@magdalena-fuchs
Comment options

@ZiyueXu77
Comment options

Answer selected by ZiyueXu77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants