flowMC 0.4.2__tar.gz → 0.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flowmc-0.4.2 → flowmc-0.4.4}/PKG-INFO +26 -27
- {flowmc-0.4.2 → flowmc-0.4.4}/README.md +7 -20
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/quickstart.md +1 -1
- flowmc-0.4.4/docs/tutorials/dualmoon.ipynb +508 -0
- flowmc-0.4.4/docs/tutorials/parallel_tempering.ipynb +571 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/pyproject.toml +25 -7
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/Sampler.py +1 -1
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/local_kernel/HMC.py +6 -3
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/local_kernel/base.py +3 -15
- flowmc-0.4.4/src/flowMC/resource/nf_model/NF_proposal.py +185 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/nf_model/base.py +1 -0
- flowmc-0.4.4/src/flowMC/resource/states.py +63 -0
- flowmc-0.4.4/src/flowMC/resource_strategy_bundle/RQSpline_MALA.py +271 -0
- flowmc-0.4.4/src/flowMC/resource_strategy_bundle/RQSpline_MALA_PT.py +341 -0
- flowmc-0.4.4/src/flowMC/resource_strategy_bundle/base.py +17 -0
- flowmc-0.4.4/src/flowMC/strategy/importance_sampling.py +0 -0
- flowmc-0.4.4/src/flowMC/strategy/lambda_function.py +37 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/strategy/parallel_tempering.py +61 -23
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/strategy/take_steps.py +27 -8
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/strategy/train_model.py +8 -6
- flowmc-0.4.4/src/flowMC/strategy/update_state.py +47 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/test/integration/test_HMC.py +12 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/test/integration/test_MALA.py +11 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/test/integration/test_RWMCMC.py +11 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/test/integration/test_quickstart.py +1 -1
- flowmc-0.4.4/test/unit/test_bundle.py +57 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/test/unit/test_kernels.py +38 -7
- {flowmc-0.4.2 → flowmc-0.4.4}/test/unit/test_resources.py +18 -4
- {flowmc-0.4.2 → flowmc-0.4.4}/test/unit/test_strategies.py +52 -3
- {flowmc-0.4.2 → flowmc-0.4.4}/uv.lock +21 -13
- flowmc-0.4.2/docs/tutorials/dualmoon.ipynb +0 -522
- flowmc-0.4.2/docs/tutorials/parallel_tempering.ipynb +0 -382
- flowmc-0.4.2/src/flowMC/resource/nf_model/NF_proposal.py +0 -125
- flowmc-0.4.2/src/flowMC/resource_strategy_bundles.py +0 -166
- flowmc-0.4.2/src/flowMC/strategy/global_tuning.py +0 -111
- {flowmc-0.4.2 → flowmc-0.4.4}/.all-contributorsrc +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.coverage +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.gitattributes +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.github/workflows/pre-commit.yml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.github/workflows/python-publish.yml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.github/workflows/run_tests.yml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.github/workflows/workflowsjoss.yml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.gitignore +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/.pre-commit-config.yaml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/CODE_OF_CONDUCT.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/CONTRIBUTING.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/LICENSE +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/FAQ.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/communityExamples.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/configuration.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/contribution.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/dual_moon.png +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/gen_ref_pages.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/index.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/logo_0810.png +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/requirements.txt +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/stylesheets/extra.css +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/tutorials/custom_strategy.ipynb +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/tutorials/dual_moon.png +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/tutorials/loading_resources.ipynb +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/docs/tutorials/train_normalizing_flow.ipynb +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/joss/paper.bib +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/joss/paper.md +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/mkdocs.yml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/readthedocs.yml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/ruff.toml +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/__init__.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/__init__.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/base.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/buffers.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/local_kernel/Gaussian_random_walk.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/local_kernel/MALA.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/local_kernel/__init__.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/logPDF.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/nf_model/__init__.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/nf_model/common.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/nf_model/realNVP.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/nf_model/rqSpline.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/resource/optimizer.py +0 -0
- {flowmc-0.4.2/src/flowMC/strategy → flowmc-0.4.4/src/flowMC/resource_strategy_bundle}/__init__.py +0 -0
- /flowmc-0.4.2/src/flowMC/strategy/importance_sampling.py → /flowmc-0.4.4/src/flowMC/strategy/__init__.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/strategy/base.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/src/flowMC/strategy/optimization.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/test/integration/test_normalizingFlow.py +0 -0
- {flowmc-0.4.2 → flowmc-0.4.4}/test/unit/test_nf.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flowMC
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: Normalizing flow exhanced sampler in jax
|
|
5
5
|
Project-URL: Documentation, https://github.com/kazewong/flowMC
|
|
6
6
|
Author: Marylou Gabrié, Dan Foreman-Mackey
|
|
@@ -28,19 +28,30 @@ License: MIT License
|
|
|
28
28
|
SOFTWARE.
|
|
29
29
|
License-File: LICENSE
|
|
30
30
|
Keywords: autodiff,inference,jax,machine learning,normalizing,sampling
|
|
31
|
+
Classifier: Intended Audience :: Science/Research
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
36
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
37
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
38
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
31
39
|
Requires-Python: >=3.11
|
|
32
40
|
Requires-Dist: chex>=0.1.87
|
|
33
|
-
Requires-Dist: coveralls>=4.0.1
|
|
34
41
|
Requires-Dist: equinox>=0.11.9
|
|
35
|
-
Requires-Dist: jax[
|
|
42
|
+
Requires-Dist: jax[cpu]>=0.5.0
|
|
36
43
|
Requires-Dist: jaxtyping>=0.2.36
|
|
37
44
|
Requires-Dist: optax>=0.2.4
|
|
38
|
-
Requires-Dist: pre-commit==4.0.1
|
|
39
|
-
Requires-Dist: pyright==1.1.389
|
|
40
|
-
Requires-Dist: pytest==8.3.3
|
|
41
|
-
Requires-Dist: ruff==0.8.0
|
|
42
45
|
Requires-Dist: scikit-learn>=1.6.0
|
|
43
46
|
Requires-Dist: tqdm>=4.67.1
|
|
47
|
+
Provides-Extra: codeqa
|
|
48
|
+
Requires-Dist: coveralls>=4.0.1; extra == 'codeqa'
|
|
49
|
+
Requires-Dist: pre-commit>=4.0.1; extra == 'codeqa'
|
|
50
|
+
Requires-Dist: pyright>=1.1.389; extra == 'codeqa'
|
|
51
|
+
Requires-Dist: pytest>=8.3.3; extra == 'codeqa'
|
|
52
|
+
Requires-Dist: ruff>=0.8.0; extra == 'codeqa'
|
|
53
|
+
Provides-Extra: cuda
|
|
54
|
+
Requires-Dist: jax[cuda12]>=0.5.0; extra == 'cuda'
|
|
44
55
|
Provides-Extra: docs
|
|
45
56
|
Requires-Dist: mkdocs-gen-files==0.5.0; extra == 'docs'
|
|
46
57
|
Requires-Dist: mkdocs-jupyter==0.25.1; extra == 'docs'
|
|
@@ -52,6 +63,7 @@ Requires-Dist: pymdown-extensions==10.12; extra == 'docs'
|
|
|
52
63
|
Provides-Extra: visualize
|
|
53
64
|
Requires-Dist: arviz>=0.21.0; extra == 'visualize'
|
|
54
65
|
Requires-Dist: corner>=2.2.3; extra == 'visualize'
|
|
66
|
+
Requires-Dist: matplotlib>=3.9.3; extra == 'visualize'
|
|
55
67
|
Description-Content-Type: text/markdown
|
|
56
68
|
|
|
57
69
|
# flowMC
|
|
@@ -90,12 +102,10 @@ pip install flowMC
|
|
|
90
102
|
This will install the latest stable release and its dependencies.
|
|
91
103
|
flowMC is based on [Jax](https://github.com/google/jax) and [Equinox](https://github.com/patrick-kidger/equinox).
|
|
92
104
|
By default, installing flowMC will automatically install Jax and Equinox available on [PyPI](https://pypi.org).
|
|
93
|
-
Jax
|
|
94
|
-
If you want to use GPU with Jax, you need to install Jax with GPU support according to their document.
|
|
95
|
-
At the time of writing this documentation page, this is the command to install Jax with GPU support:
|
|
105
|
+
By default this install the CPU version of Jax. If you have a GPU and want to use it, you can install the GPU version of Jax by running:
|
|
96
106
|
|
|
97
107
|
```
|
|
98
|
-
pip install
|
|
108
|
+
pip install flowMC[cuda]
|
|
99
109
|
```
|
|
100
110
|
|
|
101
111
|
If you want to install the latest version of flowMC, you can clone this repo and install it locally:
|
|
@@ -106,23 +116,12 @@ cd flowMC
|
|
|
106
116
|
pip install -e .
|
|
107
117
|
```
|
|
108
118
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
* Python 3.9+
|
|
114
|
-
* Jax
|
|
115
|
-
* Jaxlib
|
|
116
|
-
* equinox
|
|
117
|
-
|
|
118
|
-
To visualize the inference results in the examples, we requrie the following packages in addtion to the above:
|
|
119
|
-
|
|
120
|
-
* matplotlib
|
|
121
|
-
* corner
|
|
122
|
-
* arviz
|
|
123
|
-
|
|
124
|
-
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.
|
|
119
|
+
There are a couple more extras that you can install with flowMC, including:
|
|
120
|
+
- `flowMC[docs]`: Install the documentation dependencies.
|
|
121
|
+
- `flowMC[codeqa]`: Install the code quality dependencies.
|
|
122
|
+
- `flowMC[visualize]`: Install the visualization dependencies.
|
|
125
123
|
|
|
124
|
+
On top of `pip` installation, we highly encourage you to use [uv](https://docs.astral.sh/uv/) to manage your python environment. Once you clone the repo, you can run `uv sync` to create a virtual environment with all the dependencies installed.
|
|
126
125
|
# Attribution
|
|
127
126
|
|
|
128
127
|
If you used `flowMC` in your research, we would really appericiate it if you could at least cite the following papers:
|
|
@@ -34,12 +34,10 @@ pip install flowMC
|
|
|
34
34
|
This will install the latest stable release and its dependencies.
|
|
35
35
|
flowMC is based on [Jax](https://github.com/google/jax) and [Equinox](https://github.com/patrick-kidger/equinox).
|
|
36
36
|
By default, installing flowMC will automatically install Jax and Equinox available on [PyPI](https://pypi.org).
|
|
37
|
-
Jax
|
|
38
|
-
If you want to use GPU with Jax, you need to install Jax with GPU support according to their document.
|
|
39
|
-
At the time of writing this documentation page, this is the command to install Jax with GPU support:
|
|
37
|
+
By default this install the CPU version of Jax. If you have a GPU and want to use it, you can install the GPU version of Jax by running:
|
|
40
38
|
|
|
41
39
|
```
|
|
42
|
-
pip install
|
|
40
|
+
pip install flowMC[cuda]
|
|
43
41
|
```
|
|
44
42
|
|
|
45
43
|
If you want to install the latest version of flowMC, you can clone this repo and install it locally:
|
|
@@ -50,23 +48,12 @@ cd flowMC
|
|
|
50
48
|
pip install -e .
|
|
51
49
|
```
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
* Python 3.9+
|
|
58
|
-
* Jax
|
|
59
|
-
* Jaxlib
|
|
60
|
-
* equinox
|
|
61
|
-
|
|
62
|
-
To visualize the inference results in the examples, we requrie the following packages in addtion to the above:
|
|
63
|
-
|
|
64
|
-
* matplotlib
|
|
65
|
-
* corner
|
|
66
|
-
* arviz
|
|
67
|
-
|
|
68
|
-
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.
|
|
51
|
+
There are a couple more extras that you can install with flowMC, including:
|
|
52
|
+
- `flowMC[docs]`: Install the documentation dependencies.
|
|
53
|
+
- `flowMC[codeqa]`: Install the code quality dependencies.
|
|
54
|
+
- `flowMC[visualize]`: Install the visualization dependencies.
|
|
69
55
|
|
|
56
|
+
On top of `pip` installation, we highly encourage you to use [uv](https://docs.astral.sh/uv/) to manage your python environment. Once you clone the repo, you can run `uv sync` to create a virtual environment with all the dependencies installed.
|
|
70
57
|
# Attribution
|
|
71
58
|
|
|
72
59
|
If you used `flowMC` in your research, we would really appericiate it if you could at least cite the following papers:
|
|
@@ -47,7 +47,7 @@ To sample an N dimensional Gaussian, you would do something like:
|
|
|
47
47
|
import jax
|
|
48
48
|
import jax.numpy as jnp
|
|
49
49
|
from flowMC.Sampler import Sampler
|
|
50
|
-
from flowMC.
|
|
50
|
+
from flowMC.resource_strategy_bundle.RQSpline_MALA import RQSpline_MALA_Bundle
|
|
51
51
|
|
|
52
52
|
# Defining the log posterior
|
|
53
53
|
|