Fixed FedAvg aggregation dispatch for delta-only strategy overrides.#408
Merged
Fixed FedAvg aggregation dispatch for delta-only strategy overrides.#408
Conversation
The composable FedAvg server always preferred aggregate_weights() when the aggregation strategy exposed that method. This broke strategies inheriting FedAvgAggregationStrategy that override only aggregate_deltas(), because the inherited FedAvg weight aggregation path ran first and bypassed the custom delta logic entirely. Add a dispatch guard in plato/servers/fedavg.py so the server does not take the inherited FedAvg aggregate_weights() fast path when the strategy class has customized aggregate_deltas() instead. This restores the intended execution path for Polaris and other similar strategies using the strategy-based server design. Add a regression test covering Server._process_reports() with a delta-only FedAvg strategy subclass to ensure custom aggregate_deltas() hooks are not shadowed by inherited weight aggregation.
✅ Deploy Preview for platodocs canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixed the composable FedAvg server so delta-only aggregation strategies are no longer bypassed by the inherited direct weight aggregation path. It restored the intended strategy-based execution flow for Polaris and other examples that customize delta aggregation behavior, and added regression coverage for the server dispatch rule.
Changes
Updated the FedAvg server dispatch logic to avoid preferring the inherited direct-weight aggregation path when a strategy customized only delta aggregation.
Restored the expected aggregation behavior for Polaris and other strategy-based examples whose custom logic lives in delta aggregation hooks.
Added a regression test that exercised server-side report processing with a delta-only aggregation strategy subclass and verified that the custom delta hook executed.
Closes #406.