flowMC


NameflowMC JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/kazewong/flowMC
SummaryNormalizing flow exhanced sampler in jax
upload_time2024-04-19 21:33:21
maintainerNone
docs_urlNone
authorKaze Wong, Marylou Gabrié, Dan Foreman-Mackey
requires_python>=3.10
licenseMIT
keywords sampling inference machine learning normalizing autodiff jax
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # flowMC

**Normalizing-flow enhanced sampling package for probabilistic inference**

<a href="https://flowmc.readthedocs.io/en/main/">
<img src="https://badgen.net/badge/Read/the doc/blue" alt="doc"/>
</a>
<a href="https://github.com/kazewong/FlowMC/blob/Packaging/LICENSE">
<img src="https://badgen.net/badge/License/MIT/blue" alt="doc"/>
</a>

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

flowMC is a Jax-based python package for normalizing-flow enhanced Markov chain Monte Carlo (MCMC) sampling.
The code is open source under MIT license, and it is under active development.

- Just-in-time compilation is supported.
- Native support for GPU acceleration.
- Suit for problems with multi-modality.
- Minimal tuning.

# Installation 

The simplest way to install the package is to do it through pip

```
pip install flowMC
```

This will install the latest stable release and its dependencies.
flowMC is based on [Jax](https://github.com/google/jax) and [Equinox](https://github.com/patrick-kidger/equinox).
By default, installing flowMC will automatically install Jax and Equinox available on [PyPI](https://pypi.org).
Jax does not install GPU support by default.
If you want to use GPU with Jax, you need to install Jax with GPU support according to their document.
At the time of writing this documentation page, this is the command to install Jax with GPU support:

```
pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
```

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

```
git clone https://github.com/kazewong/flowMC.git
cd flowMC
pip install -e .
```

## Requirements

Here is a list of packages we use in the main library

    * Python 3.9+
    * Jax
    * Jaxlib
    * equinox

To visualize the inference results in the examples, we requrie the following packages in addtion to the above:

    * matplotlib
    * corner
    * arviz

The test suite is based on pytest. To run the tests, one needs to install `pytest` and run `pytest` at the root directory of this repo.

# Attribution

If you used `flowMC` in your research, we would really appericiate it if you could at least cite the following papers:

```
@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"
}
```

This will help `flowMC` getting more recognition, and the main benefit *for you* is this means the `flowMC` community will grow and it will be continuously improved. If you believe in the magic of open-source software, please support us by attributing our software in your work.


`flowMC` is a Jax implementation of methods described in: 
> *Efficient Bayesian Sampling Using Normalizing Flows to Assist Markov Chain Monte Carlo Methods* Gabrié M., Rotskoff G. M., Vanden-Eijnden E. - ICML INNF+ workshop 2021 - [pdf](https://openreview.net/pdf?id=mvtooHbjOwx)

> *Adaptive Monte Carlo augmented with normalizing flows.*
Gabrié M., Rotskoff G. M., Vanden-Eijnden E. - PNAS 2022 - [doi](https://www.pnas.org/doi/10.1073/pnas.2109420119), [arxiv](https://arxiv.org/abs/2105.12603)

 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kazewong/flowMC",
    "name": "flowMC",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "sampling, inference, machine learning, normalizing, autodiff, jax",
    "author": "Kaze Wong, Marylou Gabri\u00e9, Dan Foreman-Mackey",
    "author_email": "kazewong.physics@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b3/84/68ffa706552fbc7d7beb92c440a929f8bfbfb0c23b286b822a478adb0258/flowmc-0.3.2.tar.gz",
    "platform": null,
    "description": "# flowMC\n\n**Normalizing-flow enhanced sampling package for probabilistic inference**\n\n<a href=\"https://flowmc.readthedocs.io/en/main/\">\n<img src=\"https://badgen.net/badge/Read/the doc/blue\" alt=\"doc\"/>\n</a>\n<a href=\"https://github.com/kazewong/FlowMC/blob/Packaging/LICENSE\">\n<img src=\"https://badgen.net/badge/License/MIT/blue\" alt=\"doc\"/>\n</a>\n\n![flowMC_logo](./docs/logo_0810.png)\n\nflowMC is a Jax-based python package for normalizing-flow enhanced Markov chain Monte Carlo (MCMC) sampling.\nThe code is open source under MIT license, and it is under active development.\n\n- Just-in-time compilation is supported.\n- Native support for GPU acceleration.\n- Suit for problems with multi-modality.\n- Minimal tuning.\n\n# Installation \n\nThe simplest way to install the package is to do it through pip\n\n```\npip install flowMC\n```\n\nThis will install the latest stable release and its dependencies.\nflowMC is based on [Jax](https://github.com/google/jax) and [Equinox](https://github.com/patrick-kidger/equinox).\nBy default, installing flowMC will automatically install Jax and Equinox available on [PyPI](https://pypi.org).\nJax does not install GPU support by default.\nIf you want to use GPU with Jax, you need to install Jax with GPU support according to their document.\nAt the time of writing this documentation page, this is the command to install Jax with GPU support:\n\n```\npip install --upgrade \"jax[cuda12_pip]\" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n```\n\nIf you want to install the latest version of flowMC, you can clone this repo and install it locally:\n\n```\ngit clone https://github.com/kazewong/flowMC.git\ncd flowMC\npip install -e .\n```\n\n## Requirements\n\nHere is a list of packages we use in the main library\n\n    * Python 3.9+\n    * Jax\n    * Jaxlib\n    * equinox\n\nTo visualize the inference results in the examples, we requrie the following packages in addtion to the above:\n\n    * matplotlib\n    * corner\n    * arviz\n\nThe test suite is based on pytest. To run the tests, one needs to install `pytest` and run `pytest` at the root directory of this repo.\n\n# Attribution\n\nIf you used `flowMC` in your research, we would really appericiate it if you could at least cite the following papers:\n\n```\n@article{Wong:2022xvh,\n    author = \"Wong, Kaze W. k. and Gabri\\'e, Marylou and Foreman-Mackey, Daniel\",\n    title = \"{flowMC: Normalizing flow enhanced sampling package for probabilistic inference in JAX}\",\n    eprint = \"2211.06397\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"astro-ph.IM\",\n    doi = \"10.21105/joss.05021\",\n    journal = \"J. Open Source Softw.\",\n    volume = \"8\",\n    number = \"83\",\n    pages = \"5021\",\n    year = \"2023\"\n}\n\n@article{Gabrie:2021tlu,\n    author = \"Gabri\\'e, Marylou and Rotskoff, Grant M. and Vanden-Eijnden, Eric\",\n    title = \"{Adaptive Monte Carlo augmented with normalizing flows}\",\n    eprint = \"2105.12603\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"physics.data-an\",\n    doi = \"10.1073/pnas.2109420119\",\n    journal = \"Proc. Nat. Acad. Sci.\",\n    volume = \"119\",\n    number = \"10\",\n    pages = \"e2109420119\",\n    year = \"2022\"\n}\n```\n\nThis will help `flowMC` getting more recognition, and the main benefit *for you* is this means the `flowMC` community will grow and it will be continuously improved. If you believe in the magic of open-source software, please support us by attributing our software in your work.\n\n\n`flowMC` is a Jax implementation of methods described in: \n> *Efficient Bayesian Sampling Using Normalizing Flows to Assist Markov Chain Monte Carlo Methods* Gabri\u00e9 M., Rotskoff G. M., Vanden-Eijnden E. - ICML INNF+ workshop 2021 - [pdf](https://openreview.net/pdf?id=mvtooHbjOwx)\n\n> *Adaptive Monte Carlo augmented with normalizing flows.*\nGabri\u00e9 M., Rotskoff G. M., Vanden-Eijnden E. - PNAS 2022 - [doi](https://www.pnas.org/doi/10.1073/pnas.2109420119), [arxiv](https://arxiv.org/abs/2105.12603)\n\n \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Normalizing flow exhanced sampler in jax",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/kazewong/flowMC"
    },
    "split_keywords": [
        "sampling",
        " inference",
        " machine learning",
        " normalizing",
        " autodiff",
        " jax"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8307c2843b73e335da637e9f6df3173253c887f324d10cf62a4fa5b2d7ef3921",
                "md5": "454c00fb9cc661f53c5558195a519f66",
                "sha256": "9a3373034fb69ea6f987df10cf9392719ce955cc6502f1206d5d2d0ec0977e75"
            },
            "downloads": -1,
            "filename": "flowMC-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "454c00fb9cc661f53c5558195a519f66",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 37150,
            "upload_time": "2024-04-19T21:33:20",
            "upload_time_iso_8601": "2024-04-19T21:33:20.170044Z",
            "url": "https://files.pythonhosted.org/packages/83/07/c2843b73e335da637e9f6df3173253c887f324d10cf62a4fa5b2d7ef3921/flowMC-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b38468ffa706552fbc7d7beb92c440a929f8bfbfb0c23b286b822a478adb0258",
                "md5": "7fd070d86727c61760a5438c6a100977",
                "sha256": "cff291658757d042edd3bf1e9204774e54dbeeb51c929983164bae74407a6d75"
            },
            "downloads": -1,
            "filename": "flowmc-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7fd070d86727c61760a5438c6a100977",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 28837,
            "upload_time": "2024-04-19T21:33:21",
            "upload_time_iso_8601": "2024-04-19T21:33:21.868276Z",
            "url": "https://files.pythonhosted.org/packages/b3/84/68ffa706552fbc7d7beb92c440a929f8bfbfb0c23b286b822a478adb0258/flowmc-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-19 21:33:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kazewong",
    "github_project": "flowMC",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "flowmc"
}
        
Elapsed time: 0.27794s