Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
write global weights for the initial round
Browse files Browse the repository at this point in the history
  • Loading branch information
little-dude committed Feb 18, 2020
1 parent 5d52581 commit f1efdc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ def mock_participant_store(*_args):
)
mock_local_part = mocker.patch("xain_sdk.participant.Participant")
mock_local_part.init_weights.return_value = init_weight
mock_local_part.train_round.return_value = init_weight, 1
mock_local_part.dummy_id = "participant1"

config: Config = Config.from_unchecked_dict(participant_config)
Expand Down
3 changes: 3 additions & 0 deletions xain_fl/coordinator/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ def __init__( # pylint: disable=too-many-arguments
self.current_round: int = 0
self.epochs_current_round: int = epochs

# Write the weights for the initial round
self.global_weights_writer.write_weights(0, self.weights)

self._write_metrics_fail_silently(
{
"state": self.state,
Expand Down

0 comments on commit f1efdc6

Please sign in to comment.