Skip to content

[Task Runner API] [Flower Interoperability] Integrate changes for flower-app-pytorch workspace's custom Aggregator into core component#1585

Merged
kminhta merged 7 commits intosecurefederatedai:developfrom
kminhta:integrate-flwr-aggregator-to-core
May 2, 2025
Merged

[Task Runner API] [Flower Interoperability] Integrate changes for flower-app-pytorch workspace's custom Aggregator into core component#1585
kminhta merged 7 commits intosecurefederatedai:developfrom
kminhta:integrate-flwr-aggregator-to-core

Conversation

@kminhta
Copy link
Copy Markdown
Collaborator

@kminhta kminhta commented May 1, 2025

Summary

flower-app-pytorch workspace was originally written to be as self-contained as possible, this included its own custom aggregator that subclassed the core Aggregator. This PR cleans up and pulls these features back into the core Aggregator

This is part of a larger effort to pull custom workspace code back to the core OpenFL for better maintainability and for more native support of Flower workloads. This is being done piecewise as they are not interdependent and it'll be easier to track and control individual component changes.

Type of Change (Mandatory)

Specify the type of change being made.

  • Feature enhancement
  • Refactor

Description (Mandatory)

This PR:

  • removes openfl-workspace/flower-app-pytorch/src/aggregator.py
  • adds connector input and self.connectorattribute to the coreAggregator`
  • adds conditionals related to self.connector in order to:
    • defining self.model as an empty dict since we will allow Flower apps handle the "inner" experiment at this stage
    • skip processing task results (same reason as above)
    • skip computing validation metrics (same reason as above)
    • skip saving model (same reason as above)
  • clean up connector related logic at the aggregator server to reduce lines of code (the original custom aggregator has additional connector methods (i.e. 'is_connector_available()` that were deemed superfluous)

Testing

Manual testing

Signed-off-by: kta-intel <kevin.ta@intel.com>
kminhta and others added 2 commits May 1, 2025 14:58
Copy link
Copy Markdown
Collaborator

@teoparvanov teoparvanov left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @kta-intel !

Comment thread openfl-workspace/flower-app-pytorch/plan/plan.yaml
Comment thread openfl/component/aggregator/aggregator.py
Comment thread openfl/transport/grpc/aggregator_server.py Outdated
kminhta and others added 4 commits May 2, 2025 12:54
Signed-off-by: kta-intel <kevin.ta@intel.com>
Signed-off-by: kta-intel <kevin.ta@intel.com>
Signed-off-by: kta-intel <kevin.ta@intel.com>
@kminhta kminhta merged commit 8479136 into securefederatedai:develop May 2, 2025
35 checks passed
payalcha pushed a commit to payalcha/openfl that referenced this pull request May 6, 2025
…ower-app-pytorch` workspace's custom `Aggregator` into core component (securefederatedai#1585)

* integrate custom flwr workspace aggregator to core aggregator

Signed-off-by: kta-intel <kevin.ta@intel.com>

* formatting

Signed-off-by: kta-intel <kevin.ta@intel.com>

* change self.use_connector > self.interop_mode

Signed-off-by: kta-intel <kevin.ta@intel.com>

* docstring for connector

Signed-off-by: kta-intel <kevin.ta@intel.com>

* formatting

Signed-off-by: kta-intel <kevin.ta@intel.com>

---------

Signed-off-by: kta-intel <kevin.ta@intel.com>
Co-authored-by: teoparvanov <teodor.parvanov@intel.com>
Signed-off-by: Chaurasiya, Payal <payal.chaurasiya@intel.com>
tayfunceylan pushed a commit to tayfunceylan/openfl that referenced this pull request May 23, 2025
…ower-app-pytorch` workspace's custom `Aggregator` into core component (securefederatedai#1585)

* integrate custom flwr workspace aggregator to core aggregator

Signed-off-by: kta-intel <kevin.ta@intel.com>

* formatting

Signed-off-by: kta-intel <kevin.ta@intel.com>

* change self.use_connector > self.interop_mode

Signed-off-by: kta-intel <kevin.ta@intel.com>

* docstring for connector

Signed-off-by: kta-intel <kevin.ta@intel.com>

* formatting

Signed-off-by: kta-intel <kevin.ta@intel.com>

---------

Signed-off-by: kta-intel <kevin.ta@intel.com>
Co-authored-by: teoparvanov <teodor.parvanov@intel.com>
Signed-off-by: Tayfun Ceylan <tayfun.ceylan>
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