flowMC


NameflowMC JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://github.com/kazewong/flowMC
SummaryNormalizing flow exhanced sampler in jax
upload_time2024-05-18 02:04:15
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/27/bf/18ecaceaa43989123413b3ebfa0e9dbc9c29759ab748938f6d1fe44cae80/flowmc-0.3.4.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.4",
    "project_urls": {
        "Homepage": "https://github.com/kazewong/flowMC"
    },
    "split_keywords": [
        "sampling",
        " inference",
        " machine learning",
        " normalizing",
        " autodiff",
        " jax"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10938ed7610e900278a6cfc8edf1ada5fa13032bec88296b27ee7aa57273005d",
                "md5": "a892d4c2869e708f140c6cefe0165f83",
                "sha256": "b65c2cc892c07056ea51f1056a4ef4df8d8075b924a76f242efb5b37654716bf"
            },
            "downloads": -1,
            "filename": "flowMC-0.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a892d4c2869e708f140c6cefe0165f83",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 37730,
            "upload_time": "2024-05-18T02:04:13",
            "upload_time_iso_8601": "2024-05-18T02:04:13.483786Z",
            "url": "https://files.pythonhosted.org/packages/10/93/8ed7610e900278a6cfc8edf1ada5fa13032bec88296b27ee7aa57273005d/flowMC-0.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27bf18ecaceaa43989123413b3ebfa0e9dbc9c29759ab748938f6d1fe44cae80",
                "md5": "0bbecda2bde769547ba2766bc2568fc2",
                "sha256": "ad64011efdb58ff624b176bc0853aee549fdeb37e5a7a7081580eb5009b2945f"
            },
            "downloads": -1,
            "filename": "flowmc-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "0bbecda2bde769547ba2766bc2568fc2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 29392,
            "upload_time": "2024-05-18T02:04:15",
            "upload_time_iso_8601": "2024-05-18T02:04:15.155956Z",
            "url": "https://files.pythonhosted.org/packages/27/bf/18ecaceaa43989123413b3ebfa0e9dbc9c29759ab748938f6d1fe44cae80/flowmc-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-18 02:04:15",
    "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: 1.25583s