Skip to main content

Federated learning simulation with JAX.

Project description

FedJAX: Federated learning simulation with JAX

Build and minimal test

Documentation

NOTE: FedJAX is not an officially supported Google product. FedJAX is still in the early stages and the API will likely continue to change.

What is FedJAX?

FedJAX is a library for developing custom Federated Learning (FL) algorithms in JAX. FedJAX prioritizes ease-of-use and is intended to be useful for anyone with knowledge of NumPy.

FedJAX is built around the common core components needed in the FL setting:

  • Federated datasets: Clients and a dataset for each client
  • Models: CNN, ResNet, etc.
  • Optimizers: SGD, Momentum, etc.
  • Federated algorithms: Client updates and server aggregation

For Models and Optimizers, FedJAX provides lightweight wrappers and containers that can work with a variety of existing implementations (e.g. Haiku, Stax, Optax).

However, what FL researchers will find most useful is the collection and customizability of Federated algorithms provided out of box by FedJAX.

Quickstart

The FedJAX Intro notebook provides an introduction into writing and running FedJAX experiments.

You can also take a look at some of our examples:

Installation

You will need Python 3.6 or later and a working JAX installation. For a CPU-only version:

pip install --upgrade pip
pip install --upgrade jax jaxlib  # CPU-only version

For other devices (e.g. GPU), follow these instructions.

Then, install fedjax from PyPi:

pip install fedjax

Or, to upgrade to the latest version of fedjax:

pip install --upgrade git+https://github.com/google/fedjax.git

Citing FedJAX

To cite this repository:

@software{fedjax2020github,
  author = {Jae Hun Ro and Ananda Theertha Suresh and Ke Wu},
  title = {{F}ed{JAX}: Federated learning simulation with {JAX}},
  url = {http://github.com/google/fedjax},
  version = {0.0.3},
  year = {2020},
}

In the above bibtex entry, the version number is intended to be that from fedjax/version.py, and the year corresponds to the project's open-source release.

Useful pointers

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fedjax-0.0.6.tar.gz (132.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fedjax-0.0.6-py3-none-any.whl (234.0 kB view details)

Uploaded Python 3

File details

Details for the file fedjax-0.0.6.tar.gz.

File metadata

  • Download URL: fedjax-0.0.6.tar.gz
  • Upload date:
  • Size: 132.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

File hashes

Hashes for fedjax-0.0.6.tar.gz
Algorithm Hash digest
SHA256 d59317ec43fdce4c8ae4faa614ab411979c9256e84bdd6564972224417ca49e6
MD5 9816a0a91393c2a842ec40713e46d815
BLAKE2b-256 5bc73735bf24ff6d6e3858fa418e067dc15adf66abc0e82661e68a40560d444f

See more details on using hashes here.

File details

Details for the file fedjax-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: fedjax-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 234.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

File hashes

Hashes for fedjax-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9e69d356165540711756fb034d1743fd720ab9b64b34c74d42fb13b466f91f1c
MD5 55188e2b78330a69685f3fc80f1ad84b
BLAKE2b-256 bdd5ccad567130fc15bb44ed65841993d9f9fe347e3d4a273821446062b80f25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page