Package: declearn
Declearn: a modular and extensible framework for Federated LearningIntroductionSetupQuickstartUsage of the Python APIDevelopersCopyrightIntroductiondeclearnis a python package providing with a framework to perform federated
learning, i.e. to train machine learning models by distributing computations
across a set of data owners that, consequently, only have to share aggregated
information (rather than individual data samples) with an orchestrating server
(and, by extension, with each other).The aim ofdeclearnis to provide both real-world end-users and algorithm
researchers with a modular and extensible framework that:builds onabstractionsgeneral enough to write backbone algorithmic code
agnostic to the actual computation framework, statistical model details
or network communications setupdesignsmodular and combinableobjects, so that algorithmic features, and
more generally any specific implementation of a component (the model, network
protocol, client or server optimizer...) may easily be plugged into the main
federated learning process - enabling users to experiment with configurations
that intersect unitary featuresprovides with functioning tools that may be usedout-of-the-boxto set up
federated learning tasks using some popular computation frameworks (scikit-
learn, tensorflow, pytorch...) and federated learning algorithms (FedAvg,
Scaffold, FedYogi...)provides with tools that enableextendingthe support of existing tools
and APIs to custom functions and classes without having to hack into the
source code, merely adding new features (tensor libraries, model classes,
optimization plug-ins, orchestration algorithms, communication protocols...)
to the partyAt the moment,declearnhas been focused on so-called "centralized" federated
learning that implies a central server orchestrating computations, but it might
become more oriented towards decentralized processes in the future, that remove
the use of a central agent.SetupTL;DR:Usepip install declearnto install the package's latest release fromPyPI.Usepip install declearn[all]to install all extra dependencies, that
notably include network communication and machine learning frameworks.You may be picky as to the extra dependencies you want to install: for
that, please have a look at the[project.optional-dependencies]section
of thepyproject.tomlfile.If you want to read more about how to setup for and finally install declearn,
you may read theinstallation guideQuickstartOurquickstartexample is the right place to start with if you want too see in a glance
what end-user declearn code looks like.Usage of the Python APITheuser guideis the natural entrypoint to learn more about declearn's take on Federated
Learning, the current package capabilities, how to implement your own use
case, and the structure and key points of the package's API.To dive directly into the code's documentation, you may also jump to theAPI reference.DevelopersInformation for developers, such as how to contribute, coding rules, and how
to run the tests, can be found in thedeveloper guide.CopyrightDeclearn is an open-source software developed by people from theMagnetteam atInria.AuthorsCurrent core developers are listed under thepyproject.tomlfile. A more
detailed acknowledgement and history of authors and contributors to declearn
can be found in theAUTHORSfile.LicenseDeclearn distributed under the Apache-2.0 license. All code files should
therefore contain the following mention, which also applies to the present
README file:Copyright 2023 Inria (Institut National de la Recherche en Informatique
et Automatique)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.