Skip to content

feat(baselines): Add FedSaSync strategy#7503

Open
VictorHidalgoUCLM wants to merge 39 commits into
flwrlabs:mainfrom
VictorHidalgoUCLM:main
Open

feat(baselines): Add FedSaSync strategy#7503
VictorHidalgoUCLM wants to merge 39 commits into
flwrlabs:mainfrom
VictorHidalgoUCLM:main

Conversation

@VictorHidalgoUCLM

@VictorHidalgoUCLM VictorHidalgoUCLM commented Jun 29, 2026

Copy link
Copy Markdown

Issue

Description

Adds a new Flower baseline FedSaSync: a Semi-Asynchronous Federated Learning strategy in Flower. Experiments on CIFAR10 and MNIST under client heterogeneity.

Related issues/PRs

None.

Proposal

Explanation

  • Provides implementation for a Semi-Asynchronous aggregation algorithm in Flower.
  • Follows the official baseline template.
  • Evaluation using CIFAR10 and MNIST datasets with IID partitioning; several heterogeneous environments are simulated.

Checklist

  • Implement proposed change
  • Update documentation
  • Address LLM-reviewer comments, if applicable (e.g., GitHub Copilot)
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Any other comments?

Copilot AI review requested due to automatic review settings June 29, 2026 09:19
@VictorHidalgoUCLM VictorHidalgoUCLM marked this pull request as ready for review June 29, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 47 changed files in this pull request and generated 8 comments.

Comment thread baselines/fedsasync/fedsasync/model.py Outdated
Comment thread baselines/fedsasync/fedsasync/strategy.py
Comment thread baselines/fedsasync/fedsasync/strategy.py Outdated
Comment thread baselines/fedsasync/fedsasync/strategy.py Outdated
Comment thread baselines/fedsasync/fedsasync/dataset.py Outdated
Comment thread baselines/fedsasync/fedsasync/utils.py Outdated
Comment thread baselines/fedsasync/fedsasync/utils.py
Comment thread baselines/fedsasync/README.md Outdated
VictorHidalgoUCLM and others added 4 commits June 29, 2026 13:28
Several changes, duplicated comments ignored.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated command examples to include federation configuration for 10 supernodes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 47 changed files in this pull request and generated 4 comments.

Comment thread baselines/fedsasync/fedsasync/strategy.py
Comment thread baselines/fedsasync/fedsasync/strategy.py Outdated
Comment thread baselines/fedsasync/fedsasync/dataset.py
Comment thread baselines/fedsasync/_static/cifar10/FedAvg_fs0.csv

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 47 changed files in this pull request and generated 3 comments.

Comment thread baselines/fedsasync/pyproject.toml
Comment thread baselines/fedsasync/_static/graphing.py
Comment thread baselines/fedsasync/fedsasync/strategy.py Outdated
VictorHidalgoUCLM and others added 2 commits June 30, 2026 12:55
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Removed '.ruff_cache/**' from fab-exclude list.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 47 changed files in this pull request and generated 7 comments.

Comment thread baselines/fedsasync/fedsasync/utils.py
Comment thread baselines/fedsasync/fedsasync/strategy.py
Comment thread baselines/fedsasync/fedsasync/strategy.py Outdated
Comment thread baselines/fedsasync/README.md Outdated
Comment thread baselines/fedsasync/fedsasync/dataset.py
Comment thread baselines/fedsasync/fedsasync/dataset.py
Comment thread baselines/fedsasync/_static/graphing.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 47 changed files in this pull request and generated 4 comments.

Comment thread baselines/fedsasync/fedsasync/dataset.py
Comment thread baselines/fedsasync/fedsasync/strategy.py
Comment thread baselines/fedsasync/_static/graphing.py
Comment thread baselines/fedsasync/_static/graphing.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 47 changed files in this pull request and generated 5 comments.

Comment thread baselines/fedsasync/fedsasync/dataset.py Outdated
Comment thread baselines/fedsasync/fedsasync/strategy.py
Comment thread baselines/fedsasync/fedsasync/strategy.py
Comment thread baselines/fedsasync/fedsasync/strategy.py Outdated
Comment thread baselines/fedsasync/fedsasync/strategy.py
VictorHidalgoUCLM and others added 2 commits June 30, 2026 13:53
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@VictorHidalgoUCLM VictorHidalgoUCLM marked this pull request as ready for review June 30, 2026 11:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ae265afb3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +313 to +316
train_clients = max(
int(self.fraction_train * int(len(list(grid.get_node_ids())))),
self.min_train_nodes,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wait for nodes before fixing the sync degree

In deployments where start() runs before all SuperNodes have registered, this computes train_clients once from a partial grid.get_node_ids() result and then reuses that sync_deg for the entire run. For example, if only the minimum two nodes are visible at startup but the intended 10 clients connect moments later, configure_train can later send work to all 10 while send_and_receive_semiasync still stops after two replies, so the FedAvg/FedSaSync runs aggregate too few clients; wait for the intended training population or recompute this after nodes are available.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contributor Used to determine what PRs (mainly) come from external contributors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants