-
Notifications
You must be signed in to change notification settings - Fork 875
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
Add FedAvgM baseline #2246
Add FedAvgM baseline #2246
Conversation
Correcting validation dataset references on FlowerClient class and min_eval_clients to be in accordance with the comments.
To be compatible with sanity check for the return of fit method from clients (Tuple of list,int,dict) introduced on the last version of flower.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gubertoli, just a couple of small comments.
Co-authored-by: Javier <jafermarq@users.noreply.github.com>
Co-authored-by: Javier <jafermarq@users.noreply.github.com>
Error from test-baseline: fedavgm/strategy.py:46: error: Incompatible default for argument "initial_parameters" (default has type "None", argument has type "Parameters") [assignment]
@jafermarq as a final touch, I am running the fedavgm/strategy.py:143: error: Argument 1 to "parameters_to_ndarrays" has incompatible type "Parameters | None"; expected "Parameters" [arg-type]
fedavgm/strategy.py:172: error: Argument 1 to "parameters_to_ndarrays" has incompatible type "Parameters | None"; expected "Parameters" [arg-type] However, I inspected the Inspecting the code with VSCode shows this correct definition (non optional) - but different from The simulation is running, I am not sure about this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gubertoli,
Find below the reason why you get that mypy
error. Once fixed you'll see a few pylint
errors, they are easy to fix but let me know if you need some help.
@jafermarq as you said, there are still a few - pylint: start
************* Module fedavgm.main
fedavgm/main.py:23:0: R0914: Too many local variables (23/15) (too-many-locals)
************* Module fedavgm.client
fedavgm/client.py:13:4: R0913: Too many arguments (7/5) (too-many-arguments)
************* Module fedavgm.utils
fedavgm/utils.py:14:0: R0914: Too many local variables (26/15) (too-many-locals)
************* Module fedavgm.models
fedavgm/models.py:7:0: E0401: Unable to import 'tensorflow.nn' (import-error)
************* Module fedavgm.server
fedavgm/server.py:13:22: W0613: Unused argument 'server_round' (unused-argument)
fedavgm/server.py:31:51: W0613: Unused argument 'config' (unused-argument)
------------------------------------------------------------------
Your code has been rated at 9.73/10 (previous run: 9.67/10, +0.05) Is it expected to clear all of them? Because some would required a deeper review (too-many-locals / too-many-arguments), the import-error is not the case during tests, and for the unused-argument I think would be good for them to be present in the |
Those are fine to be ingored. But you need to tell
etc for the other errors |
@jafermarq, thank you once again 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @gubertoli, FedAvgM
looks ready. Thanks for taking part in the Flower Summer of Reproducibility!!
Fix the static method error --------- Co-authored-by: Daniel J. Beutel <daniel@flower.dev> Co-authored-by: Robert Steiner <robert@flower.dev> Update types-requests requirement from ==2.31.0.2 to ==2.31.0.10 (#2739) Updates the requirements on [types-requests](https://github.com/python/typeshed) to permit the latest version. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Taner Topal <taner@flower.dev> Make the optional arg "--callable" in `flower-client` a required positional arg. (#2673) Co-authored-by: Javier <jafermarq@users.noreply.github.com> Update jupyterlab requirement from ==4.0.8 to ==4.0.9 (#2740) Updates the requirements on [jupyterlab](https://github.com/jupyterlab/jupyterlab) to permit the latest version. - [Release notes](https://github.com/jupyterlab/jupyterlab/releases) - [Changelog](https://github.com/jupyterlab/jupyterlab/blob/@jupyterlab/lsp@4.0.9/CHANGELOG.md) - [Commits](https://github.com/jupyterlab/jupyterlab/compare/@jupyterlab/lsp@4.0.8...@jupyterlab/lsp@4.0.9) --- updated-dependencies: - dependency-name: jupyterlab dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Taner Topal <taner@flower.dev> HeteroFL baseline (#2439) Co-authored-by: jafermarq <javier@flower.dev> Retire `MXNet` examples (#2724) Co-authored-by: Taner Topal <taner@flower.dev> Rename draft release workflow and create release (#2658) Update Android manifest to include internet permission (#2672) Bump lewagon/wait-on-check-action from 1.3.1 to 1.3.3 (#2756) Bumps [lewagon/wait-on-check-action](https://github.com/lewagon/wait-on-check-action) from 1.3.1 to 1.3.3. - [Release notes](https://github.com/lewagon/wait-on-check-action/releases) - [Commits](lewagon/wait-on-check-action@v1.3.1...v1.3.3) --- updated-dependencies: - dependency-name: lewagon/wait-on-check-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Update ruff requirement from ==0.1.4 to ==0.1.9 (#2753) Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@v0.1.4...v0.1.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel J. Beutel <daniel@flower.dev> Add FedAvgM baseline (#2246) Co-authored-by: Daniel J. Beutel <daniel@adap.com> Co-authored-by: jafermarq <javier@flower.dev> Add dockerfile for flower client image (#2746) Add docker client image ci (#2747) Rename `workload_id` to `run_id` (#2769) Update README.md (#2771) Format code examples (#2767) Rename WorkloadState to RunState (#2770) Add in-place FedAvg (#2293) Update the error message when simulation crashes (#2759) Add tests Add tests Fix tests Fix tests
Issue
Description
Related issues/PRs
Implements #2052
Proposal
Explanation
Checklist
#contributions
)Any other comments?