8000 fix: async FL algorithm to follow FedBuff in aggregation by jaemin-shin · Pull Request #438 · cisco-open/flame · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: async FL algorithm to follow FedBuff in aggregation #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

jaemin-shin
Copy link
Collaborator

changed the aggregation process to only aggregate delta weights, scale down when agg goal is achieved, and then add the scaled delta weights to the original weights.

Description

Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to
related issues, other PRs, or technical references.

Note that by not including a description, you are asking reviewers to do extra work to understand the context of this
change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@codecov-commenter
Copy link
codecov-commenter commented Jun 20, 2023

Codecov Report

Merging #438 (6d9883a) into main (77a0e09) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##             main     #438   +/-   ##
=======================================
  Coverage   14.87%   14.87%           
=======================================
  Files          48       48           
  Lines        2830     2830           
=======================================
  Hits          421      421           
  Misses       2380     2380           
  Partials       29       29           

Copy link
Contributor
@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

left one comment

self.weights = self._agg_goal_weights
# set global weights, by adding scaled aggregated weights with aggregation goal
self.weights = self.optimizer.scale_add_agg_weights(
self.weights, self._agg_goal_weights, self._agg_goal
8000
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like self.weights and self.prev_weights point to the same object.
If so, we need to do a deepcopy here.
Can you please confirm if those two point to different objects?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Found these are the same; updated the code to deepcopy weights on prev_weights! Thank you very much for nice catch :)

changed the aggregation process to only aggregate delta weights, scale
down when agg goal is achieved, and then add the scaled delta weights to
the original weights.
8000 Copy link
Contributor
@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

lgtm

@jaemin-shin jaemin-shin merged commit a2b00db into cisco-open:main Jun 21, 2023
dhruvsgarg pushed a commit to dhruvsgarg/flame that referenced this pull request Oct 18, 2024
changed the aggregation process to only aggregate delta weights, scale
down when agg goal is achieved, and then add the scaled delta weights to
the original weights.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0