Mentions légales du service

Skip to content

Bugfix for ordering of weights and node replies

CREMONESI Francesco requested to merge hotfix/433-ordering-in-fedavg into master

Fixes #433 (closed).

Implementation logic: try to minimize changes, and delegate to #417 (closed) the improvement of the representation of model parameters and weights.

Changes:

  • a new method in the base aggregator called get_weights_from_node_id that returns the single numeric value of the weight associated to a specific node id, and fails if none or more than one were found
  • before we supported two formats for weights: a list of floats or a list of dictionaries. The list of floats was only used in tests, because Strategy always returns a list of dictionaries. I dropped support for list of floats, which was confusing and prone to ordering issues.

I also provide a test that reproduces the bug.

MR description

TO_BE_FILLED_BY_MR_CREATOR

Developer Certificate Of Origin (DCO)

By opening this merge request, you agree the Developer Certificate of Origin (DCO)

This DCO essentially means that:

  • you offer the changes under the same license agreement as the project, and
  • you have the right to do that,
  • you did not steal somebody else’s work.

License

Project code files should begin with these comment lines to help trace their origin:

# This file is originally part of Fed-BioMed
# SPDX-License-Identifier: Apache-2.0

Code files can be reused from another project with a compatible non-contaminating license. They shall retain the original license and copyright mentions. The CREDIT.md file and credit/ directory shall be completed and updated accordingly.

Guidelines for MR review

General:

Specific to some cases:

  • update all conda envs consistently (development and vpn, Linux and MacOS)
  • if modified researcher (eg new attributes in classes) check if breakpoint needs update (breakpoint/load_breakpoint in Experiment(), save_state/load_state in aggregators, strategies, secagg, etc.)

Merge request reports

Loading