Metadata-Version: 2.4
Name: flowMC
Version: 0.5.1
Summary: A JAX-based normalizing-flow-enhanced MCMC sampler for probabilistic inference
Project-URL: Homepage, https://github.com/GW-JAX-Team/flowMC
Project-URL: Documentation, https://gw-jax-team.github.io/flowMC/
Project-URL: Repository, https://github.com/GW-JAX-Team/flowMC
Project-URL: Bug Tracker, https://github.com/GW-JAX-Team/flowMC/issues
Project-URL: Changelog, https://github.com/GW-JAX-Team/flowMC/releases
Author: Marylou Gabrié, Dan Foreman-Mackey
Author-email: "Kaze W. K. Wong" <kazewong.physics@gmail.com>
Maintainer-email: Thomas Ng <thomas.ng@nikhef.nl>
License: MIT License
        
        Copyright (c) 2022 Kaze Wong & contributor
        Copyright (c) 2025 GW-JAX-Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: autodiff,inference,jax,machine learning,normalizing,sampling
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.11
Requires-Dist: diffrax>=0.7.0
Requires-Dist: equinox>=0.11.12
Requires-Dist: jax>=0.8.2
Requires-Dist: jaxtyping>=0.3.3
Requires-Dist: optax>=0.2.7
Requires-Dist: tqdm>=4.67.1
Provides-Extra: cuda
Requires-Dist: jax[cuda]>=0.8.2; extra == 'cuda'
Provides-Extra: visualize
Requires-Dist: arviz>=0.21.0; extra == 'visualize'
Requires-Dist: corner>=2.2.3; extra == 'visualize'
Requires-Dist: matplotlib>=3.10.7; extra == 'visualize'
Requires-Dist: numpy; extra == 'visualize'
Description-Content-Type: text/markdown

# flowMC

### A JAX-based normalizing-flow-enhanced MCMC sampler for probabilistic inference

[![docs](https://img.shields.io/badge/docs-online-blue)](https://gw-jax-team.github.io/flowMC/) [![license](https://img.shields.io/badge/License-MIT-blue)](https://github.com/GW-JAX-Team/flowMC/blob/main/LICENSE) [![coverage](https://img.shields.io/coveralls/github/GW-JAX-Team/flowMC/main)](https://coveralls.io/github/GW-JAX-Team/flowMC?branch=main) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/GW-JAX-Team/flowMC/main.svg)](https://results.pre-commit.ci/latest/github/GW-JAX-Team/flowMC/main)

![flowMC_logo](./docs/logo.png)

flowMC is a JAX-based package for normalizing-flow-enhanced Markov chain Monte Carlo (MCMC) sampling. By using normalizing flows as a global proposal, flowMC accelerates convergence for multi-modal and high-dimensional posteriors while running natively on GPU with minimal hyperparameter tuning.

For a quick introduction, see the [Quick Start guide](https://gw-jax-team.github.io/flowMC/stable/quickstart/).

> [!WARNING]
> flowMC has not yet reached v1.0.0 and the API may change. Use at your own risk. Consider pinning to a specific version if you need API stability.

## Installation

The simplest way to install flowMC is through pip:

```bash
pip install flowMC
```

This will install the latest stable release and its dependencies.
flowMC is built on [JAX](https://github.com/google/jax).
By default, this installs the CPU version of JAX.
If you have an NVIDIA GPU, install the CUDA-enabled version:

```bash
pip install flowMC[cuda]
```

If you want to install the latest version of flowMC, you can clone this repo and install it locally:

```bash
git clone https://github.com/GW-JAX-Team/flowMC.git
cd flowMC
pip install -e .
```

We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python environment. After cloning the repository, run `uv sync` to create a virtual environment with all dependencies installed.

## Attribution

If you use flowMC in your research, please cite the following papers:

```bibtex
@article{Wong:2022xvh,
    author = "Wong, Kaze W. k. and Gabri\'e, Marylou and Foreman-Mackey, Daniel",
    title = "{flowMC: Normalizing flow enhanced sampling package for probabilistic inference in JAX}",
    eprint = "2211.06397",
    archivePrefix = "arXiv",
    primaryClass = "astro-ph.IM",
    doi = "10.21105/joss.05021",
    journal = "J. Open Source Softw.",
    volume = "8",
    number = "83",
    pages = "5021",
    year = "2023"
}

@article{Gabrie:2021tlu,
    author = "Gabri\'e, Marylou and Rotskoff, Grant M. and Vanden-Eijnden, Eric",
    title = "{Adaptive Monte Carlo augmented with normalizing flows}",
    eprint = "2105.12603",
    archivePrefix = "arXiv",
    primaryClass = "physics.data-an",
    doi = "10.1073/pnas.2109420119",
    journal = "Proc. Nat. Acad. Sci.",
    volume = "119",
    number = "10",
    pages = "e2109420119",
    year = "2022"
}
```
