Skip to content

Flower 1.0.0

Compare
Choose a tag to compare
@danieljanes danieljanes released this 28 Jul 11:18
· 2184 commits to main since this release
c9c30ed

Highlights

  • Stable Virtual Client Engine (accessible via start_simulation)
  • All Client/NumPyClient methods are now optional
  • Configurable get_parameters
  • Tons of small API cleanups resulting in a more coherent developer experience

Thanks to our contributors

We would like to give our special thanks to all the contributors who made Flower 1.0 possible (in reverse GitHub Contributors order):

@rtaiello, @g-pichler, @rob-luke, @andreea-zaharia, @kinshukdua, @nfnt, @tatiana-s, @TParcollet, @vballoli, @negedng, @RISHIKESHAVAN, @hei411, @SebastianSpeitel, @AmitChaulwar, @Rubiel1, @FANTOME-PAN, @Rono-BC, @lbhm, @sishtiaq, @remde, @Jueun-Park, @architjen, @PratikGarai, @mrinaald, @zliel, @MeiruiJiang, @sandracl72, @gubertoli, @Vingt100, @MakGulati, @cozek, @jafermarq, @sisco0, @akhilmathurs, @CanTuerk, @mariaboerner1987, @pedropgusmao, @tanertopal, @danieljanes.

Incompatible changes

  • All arguments must be passed as keyword arguments (#1338)

    Pass all arguments as keyword arguments, positional arguments are not longer supported. Code that uses positional arguments (e.g., start_client("127.0.0.1:8080", FlowerClient())) must add the keyword for each positional argument (e.g., start_client(server_address="127.0.0.1:8080", client=FlowerClient())).

  • Introduce configuration object ServerConfig in start_server and start_simulation (#1317)

    Instead of a config dictionary {"num_rounds": 3, "round_timeout": 600.0}, start_server and start_simulation now expect a configuration object of type flwr.server.ServerConfig. ServerConfig takes the same arguments that as the previous config dict, but it makes writing type-safe code easier and the default parameters values more transparent.

  • Rename built-in strategy parameters for clarity (#1334)

    The following built-in strategy parameters were renamed to improve readability and consistency with other API's:

    • fraction_eval --> fraction_evaluate
    • min_eval_clients --> min_evaluate_clients
    • eval_fn --> evaluate_fn
  • Update default arguments of built-in strategies (#1278)

    All built-in strategies now use fraction_fit=1.0 and fraction_evaluate=1.0, which means they select all currently available clients for training and evaluation. Projects that relied on the previous default values can get the previous behaviour by initializing the strategy in the following way:

    strategy = FedAvg(fraction_fit=0.1, fraction_evaluate=0.1)

  • Add server_round to Strategy.evaluate (#1334)

    The Strategy method evaluate now receives the current round of federated learning/evaluation as the first parameter.

  • Add server_round and config parameters to evaluate_fn (#1334)

    The evaluate_fn passed to built-in strategies like FedAvg now takes three parameters: (1) The current round of federated learning/evaluation (server_round), (2) the model parameters to evaluate (parameters), and (3) a config dictionary (config).

  • Rename rnd to server_round (#1321)

    Several Flower methods and functions (evaluate_fn, configure_fit, aggregate_fit, configure_evaluate, aggregate_evaluate) receive the current round of federated learning/evaluation as their first parameter. To improve reaability and avoid confusion with random, this parameter has been renamed from rnd to server_round.

  • Move flwr.dataset to flwr_baselines (#1273)

    The experimental package flwr.dataset was migrated to Flower Baselines.

  • Remove experimental strategies (#1280)

    Remove unmaintained experimental strategies (FastAndSlow, FedFSv0, FedFSv1).

  • Rename Weights to NDArrays (#1258, #1259)

    flwr.common.Weights was renamed to flwr.common.NDArrays to better capture what this type is all about.

  • Remove antiquated force_final_distributed_eval from start_server (#1258, #1259)

    The start_server parameter force_final_distributed_eval has long been a historic artefact, in this release it is finally gone for good.

  • Make get_parameters configurable (#1242)

    The get_parameters method now accepts a configuration dictionary, just like get_properties, fit, and evaluate.

  • Replace num_rounds in start_simulation with new config parameter (#1281)

    The start_simulation function now accepts a configuration dictionary config instead of the num_rounds integer. This improves the consistency between start_simulation and start_server and makes transitioning between the two easier.

New features

  • Support Python 3.10 (#1320)

    The previous Flower release introduced experimental support for Python 3.10, this release declares Python 3.10 support as stable.

  • Make all Client and NumPyClient methods optional (#1260, #1277)

    The Client/NumPyClient methods get_properties, get_parameters, fit, and evaluate are all optional. This enables writing clients that implement, for example, only fit, but no other method. No need to implement evaluate when using centralized evaluation!

  • Enable passing a Server instance to start_simulation (#1281)

    Similar to start_server, start_simulation now accepts a full Server instance. This enables users to heavily customize the execution of eperiments and opens the door to running, for example, async FL using the Virtual Client Engine.

  • Update code examples (#1291, #1286, #1282)

    Many code examples received small or even large maintenance updates, among them are

    • scikit-learn
    • simulation_pytorch
    • quickstart_pytorch
    • quickstart_simulation
    • quickstart_tensorflow
    • advanced_tensorflow
  • Remove the obsolete simulation example (#1328)

    Removes the obsolete simulation example and renames quickstart_simulation to simulation_tensorflow so it fits withs the naming of simulation_pytorch

  • Update documentation (#1223, #1209, #1251, #1257, #1267, #1268, #1300, #1304, #1305, #1307)

    One substantial documentation update fixes multiple smaller rendering issues, makes titles more succinct to improve navigation, removes a deprecated library, updates documentation dependencies, includes the flwr.common module in the API reference, includes support for markdown-based documentation, migrates the changelog from .rst to .md, and fixes a number of smaller details!

  • Minor updates

    • Add round number to fit and evaluate log messages (#1266)
    • Add secure gRPC connection to the advanced_tensorflow code example (#847)
    • Update developer tooling (#1231, #1276, #1301, #1310)
    • Rename ProtoBuf messages to improve consistency (#1214, #1258, #1259)