Installation#
Note: to ensure that your installation is compatible with your local accelerators such as a GPU, we recommend to first follow the corresponding instructions to install JAX.
Recommended: Install from GitHub Head#
We highly recommend installing JAX Privacy directly from GitHub head. The repository is under active development, and installing from head ensures you get the most recent features and the best version of the library.
pip install git+https://github.com/google-parfait/jax_privacy
Dependency versions#
DP Accounting: JAX Privacy and DP Accounting are co-developed — we often add features to DP Accounting and then surface them in JAX Privacy, so installing from head ensures consistency.
Optax: Parts of JAX Privacy have been upstreamed to optax (optax.microbatching), and JAX Privacy depends on this recently-added code. Installing from head ensures updates to optax are reflected in JAX-Privacy.
Alternative: Install from PyPI#
You can also install JAX Privacy from PyPI (version 1.0 or 2.0), but note that these releases will not have all the features available on GitHub head.
pip install jax-privacy
Local Development Installation#
This option is preferred if you want to build on top of our codebase or contribute to the library.
Clone the repository:
git clone https://github.com/google-parfait/jax_privacy
Install the package in editable mode so modifications to the code are reflected in imports:
cd jax_privacy pip install -e .