Skip to content
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

Adding Workflow Interface FedProx Example with Synthetic Dataset #734

Open
wants to merge 31 commits into
base: develop
Choose a base branch
from

Conversation

ParthMandaliya
Copy link
Collaborator

@ParthMandaliya ParthMandaliya commented Feb 14, 2023

DESCRIPTION:
Workflow Interface Tutorial for FedProx with Synthetic non-IID Dataset.

SUMMARY:
Validated the Tutorial for following scenarios:

  1. Executed for 30 Total Collaborators, 10 Selected Collaborators, non-IID, and 200 Rounds
    image

  2. Executed for 100 Total Collaborators, 20 Selected Collaborators, non-IID, and 200 Rounds
    image

  3. Executed for 30 Total Collaborators, 10 Selected Collaborators, IID, and 200 Rounds
    image

  4. Validated in Google Collab

@ParthMandaliya ParthMandaliya marked this pull request as draft February 14, 2023 15:29
@ParthM-GitHub ParthM-GitHub force-pushed the fedprox_example branch 2 times, most recently from 3d30091 to a58b569 Compare February 21, 2023 05:40
@ParthMandaliya ParthMandaliya marked this pull request as ready for review February 21, 2023 13:19
ParthM-GitHub and others added 18 commits February 22, 2023 16:12
1. 10 Selected Collaborators, 30 Total Collaborators, with 200 Rounds (FedProx vs FedAvg)
2. 20 Selected Collaborators, 100 Total Collaborators, with 200 Rounds (FedProx vs FedAvg)
3. 10 Selected Collaborators, 30 Total Collaborators, with 200 Rounds (FedProx vs FedAvg) Tested on Google Colab

Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Made changes required to run the example with numpy 1.24.x version.

Signed-off-by: ParthM-GitHub <[email protected]>
Change github Python badge's

Signed-off-by: Alexey Gruzdev <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Picture for the Contributing.md

Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
* Fix variable name

Signed-off-by: Ilya Trushkin <[email protected]>

* Use CONTINUE_GLOBAL treatment in FedProx tutorial

Signed-off-by: Ilya Trushkin <[email protected]>

---------

Signed-off-by: Ilya Trushkin <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
" This is the 'end' step.\n",
" \"\"\"\n",
" self.round_number += 1\n",
" print('This is end of the flow')"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This print statement is misleading because it gets printed after every round. Let's pass total_rounds to federated flow and print this condition once at the end of the flow.

Copy link
Contributor

Choose a reason for hiding this comment

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

Incorporated

" return accuracy, test_loss, correct\n",
"\n",
"\n",
"def weighted_average(tensors, weights):\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I propose that we create openfl.experimental.interface.aggregation_functions and move this function there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Incorporated

"source": [
"!pip install git+https://github.com/intel/openfl.git\n",
"!pip install -r https://raw.githubusercontent.com/intel/openfl/develop/openfl-tutorials/experimental/requirements_workflow_interface.txt\n",
"!pip install matplotlib\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

!pip install seaborn is missing

Copy link
Contributor

Choose a reason for hiding this comment

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

Incorporated

1. Converted flow to internal loop flow
2. Added seaborn library install command

Signed-off-by: ParthM-GitHub <[email protected]>
1. PyTorch: openfl/experimental/interface/keras/aggregation_functions/weighted_average.py
2. Keras: openfl/experimental/interface/keras/aggregation_functions/weighted_average.py (with NotImplementedError)
3. PyTorch Weighted average testcase in tests/openfl/experimental/test_weighted_average.py

Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: ParthM-GitHub <[email protected]>
Signed-off-by: Parth Mandaliya <[email protected]>
Signed-off-by: Parth Mandaliya <[email protected]>
@theakshaypant
Copy link
Collaborator

@ParthMandaliya can you please resolve the comments/conflicts and request for review again?

@ParthMandaliya
Copy link
Collaborator Author

ParthMandaliya commented Dec 11, 2024

@theakshaypant This 401 FedProx tutorial has already been merged via a different PR, and is available under openfl-tutorials/experimental/workflow directory.

cc: @ishant162

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.

8 participants