Repository navigation
declearn v2.2.0
Release date: 11/05/2023
Release highlights
Declearn Quickrun Mode & Dataset-splitting utils
The two most-visible additions of v2.2 are the declearn-quickrun and declearn-split entry-point scripts, that are installed as CLI tools together with the package when running pip install declearn (or installing from source).
declearn-quickrun introduces an alternative way to use declearn so as to run a simulated Federated Learning experiment on a single computer, using localhost communications, and any model, dataset and optimization / training / evaluation configuration.
declearn-quickrun relies on:
- a python code file to specify the model;
- a standard (but partly modular) data storage structure;
- a TOML config file to specify everything else.
It is thought of as:
- a simple entry-point to newcomers, demonstrating what declearn can do with zero to minimal knowledge of the actual Python API;
- a nice way to run experiments for research purposes, with minimal setup (and the possibility to maintain multiple experiment configurations in parallel via named and/or versioned TOML config files) and standardized outputs (including model weights, full process logs and evaluation metrics).
declearn-split is a CLI tool that wraps up some otherwise-public data utils that enable splitting and preparing a supervised learning dataset for its use in a Federated Learning experiment. It is thought of as a helper to prepare data for its use with declearn-quickrun.
Support for Jax / Haiku
Another visible addition of declearn v2.2 is the support for models implemented in Jax, specifically via the neural network library Haiku.
This takes shape of the new (optional) declearn.model.haiku submodule, that provides with dedicated JaxNumpyVector and HaikuModel classes (subclassing the base Vector and Model ones). Existing unit and integration tests have been extended to cover this new framework (when available), which is therefore usable on par with Scikit-Learn, TensorFlow and Torch - up to a few framework specificities in the setup of the model, notably when it is desired to freeze some layers (which has to happen after instantiating and initializing the model, contrary to what can be done in other neural network frameworks).
Improved Documentation and Examples
Finally, this new version comes with an effort on improving the usability of the package, notably via the readability of its documentation and examples.
The documentation has been heavily-revised (which has already been partially back-ported to previous version releases upon making the documentation website public).
The legacy Heart UCI example has been improved to enable real-life execution (i.e. using multiple agents / computers communicating over the internet). More importantly, the classic MNIST dataset has been used to implement simpler and more-diverse introductory examples, that demonstrate the various flavors of declearn one can look for (including the new Quickrun mode).
The declearn.dataset.examples submodule has been introduced, so that example data loaders can be added (and maintained / tested) as part of the package. For now these utils only cover the MNIST and Heart UCI datasets, but more reference datasets are expected to be added in the future, enabling end-users to make up their own experiments and toy around the packages' functionality in no time.
Full Release Notes
Release notes are available on our website and on the source GitLab repo.