-
Notifications
You must be signed in to change notification settings - Fork 896
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into improve_ci_speed
* main: Remove line with typo from script (#2001) Fix simulation error caused by Pydantic version in Ray (#2002) Update mxnet examples dependency versions (#1982) Update torch version in pyproject.toml files (#1993) Update tensorflow examples dependency versions (#1984) Fix the baseline template docstrings (#1983) Fix Baselines CI PyLint error by using Resampling (#1998) Make tensorflow optional when using tensorboard (#1879) Update dependencies for MXNet example (#1988) Fix `starlette` vulnerability (#1992) Fix vulnerability detected by Dependabot (#1990) Fix dependabot critical errors (#1989) Add Ruff UP check (#1946) Update torch examples dependency versions (#1981) Remove && from the end of lines in test.sh (#1979) Baselines docs updates (#1977) Fixes GitHub CI issue because of behaviour change (#1976)
- Loading branch information
Showing
53 changed files
with
245 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Template baseline package.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
################################################################################## | ||
# Please use this module to define your client class and a function to construct # | ||
# such clients. Most of the code here is expected to be defined inside a class # | ||
# that inherits from `flwr.client.NumPyClient` or `flwr.client.Client`. # | ||
################################################################################## | ||
"""Define your client class and a function to construct such clients. | ||
Please overwrite `flwr.client.NumPyClient` or `flwr.client.Client` and create a function | ||
to instantiate your client. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
################################################################################## | ||
# Please use this module to define the functions to create the dataloaders for # | ||
# your dataset (for both the clients and the server). If you are using a custom # | ||
# dataset class, this module is the place to define it. If your dataset requires # | ||
# to be downloaded (and this is not done automatically -- e.g. as it is the case # | ||
# for many dataset in TorchVision) and partitioned, please include all those # | ||
# functions and logic in the `dataset_preparation.py` module. You can all those # | ||
# functions from functions/methods defined here of course. # | ||
################################################################################## | ||
"""Handle basic dataset creation. | ||
In case of PyTorch it should return dataloaders for your dataset (for both the clients | ||
and the server). If you are using a custom dataset class, this module is the place to | ||
define it. If your dataset requires to be downloaded (and this is not done | ||
automatically -- e.g. as it is the case for many dataset in TorchVision) and | ||
partitioned, please include all those functions and logic in the | ||
`dataset_preparation.py` module. You can use all those functions from functions/methods | ||
defined here of course. | ||
""" |
20 changes: 8 additions & 12 deletions
20
baselines/baseline_template/baseline_template/dataset_preparation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
################################################################################## | ||
# Please use this module to define your models, and training and eval # | ||
# functions. If your model is 100% off-the-shelf (e.g. directly from torchvision # | ||
# without requiring modifications) you might be better off instantiating your # | ||
# model directly from the Hydra config. In this way, swapping your model for # | ||
# another one can be done without changing the python code at all # | ||
################################################################################## | ||
"""Define our models, and training and eval functions. | ||
If your model is 100% off-the-shelf (e.g. directly from torchvision without requiring | ||
modifications) you might be better off instantiating your model directly from the Hydra | ||
config. In this way, swapping your model for another one can be done without changing | ||
the python code at all | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
############################################################################## | ||
# Please use this module to define the function called by your strategy in # | ||
# order to evaluate the state of the global model. You might use this module # | ||
# also to define a new Server class (please note this is not needed in most # | ||
# settings). # | ||
############################################################################## | ||
"""Create global evaluation function. | ||
Optionally, also define a new Server class (please note this is not needed in most | ||
settings). | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
############################################################################# | ||
# Only use this module if you need to define a custom strategy whether # | ||
# because it is not yet implemented in Flower or because you want to extend # | ||
# or modify the functionality of an existing strategy. # | ||
############################################################################# | ||
"""Optionally define a custom strategy. | ||
Needed only when the strategy is not yet implemented in Flower or because you want to | ||
extend or modify the functionality of an existing strategy. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
################################################################################# | ||
# Please define here any utility function that's not directly relevant to # | ||
# the other (more FL specific) python modules. For example, you may define # | ||
# here things like: loading a model from a checkpoint, saving results, plotting # | ||
################################################################################# | ||
"""Define any utility function. | ||
They are not directly relevant to the other (more FL specific) python modules. For | ||
example, you may define here things like: loading a model from a checkpoint, saving | ||
results, plotting. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
flwr~=1.4.0 | ||
torch~=2.0.1 | ||
torchvision~=0.15.2 | ||
flwr>=1.0, <2.0 | ||
torch==1.13.1 | ||
torchvision==0.13.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
flwr~=1.4.0 | ||
tensorflow~=2.12.0 | ||
flwr>=1.0, <2.0 | ||
tensorflow-macos>=2.9.1, != 2.11.1 ; sys_platform == "darwin" and platform_machine == "arm64" | ||
tensorflow-cpu>=2.9.1, != 2.11.1 ; platform_machine == "x86_64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
numpy~=1.21.1 | ||
flwr>=1.0, <2.0 | ||
tensorflow-macos>=2.9.1, != 2.11.1 ; sys_platform == "darwin" and platform_machine == "arm64" | ||
tensorflow-cpu>=2.9.1, != 2.11.1 ; platform_machine == "x86_64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
flwr~=1.4.0 | ||
numpy~=1.21.1 | ||
tensorflow~=2.12.0 | ||
tensorflow_privacy~=0.8.9 | ||
flwr>=1.0, <2.0 | ||
tensorflow-macos>=2.9.1, != 2.11.1 ; sys_platform == "darwin" and platform_machine == "arm64" | ||
tensorflow-cpu>=2.9.1, != 2.11.1 ; platform_machine == "x86_64" | ||
tensorflow-privacy==0.8.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.