bayinx 0.2.13__tar.gz → 0.2.19__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.
- {bayinx-0.2.13 → bayinx-0.2.19}/PKG-INFO +1 -1
- bayinx-0.2.19/pyproject.toml +44 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/dists/normal.py +4 -4
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/normalizing_flow.py +0 -3
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/standard.py +1 -1
- bayinx-0.2.13/pyproject.toml +0 -22
- {bayinx-0.2.13 → bayinx-0.2.19}/.github/workflows/release_and_publish.yml +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/.gitignore +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/README.md +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/__init__.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/core/__init__.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/core/flow.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/core/model.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/core/utils.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/core/variational.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/dists/__init__.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/dists/bernoulli.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/dists/binomial.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/dists/gamma.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/dists/gamma2.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/__init__.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/__init__.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/flows/__init__.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/flows/fullaffine.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/flows/planar.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/flows/radial.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/flows/sylvester.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/mhx/vi/meanfield.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/src/bayinx/py.typed +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/tests/__init__.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/tests/test_variational.py +0 -0
- {bayinx-0.2.13 → bayinx-0.2.19}/uv.lock +0 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
[project]
|
2
|
+
name = "bayinx"
|
3
|
+
version = "0.2.19"
|
4
|
+
description = "Bayesian Inference with JAX"
|
5
|
+
readme = "README.md"
|
6
|
+
requires-python = ">=3.12"
|
7
|
+
dependencies = [
|
8
|
+
"equinox>=0.11.12",
|
9
|
+
"jax>=0.4.38",
|
10
|
+
"jaxtyping>=0.2.36",
|
11
|
+
"optax>=0.2.4",
|
12
|
+
]
|
13
|
+
|
14
|
+
[build-system]
|
15
|
+
requires = ["hatchling"]
|
16
|
+
build-backend = "hatchling.build"
|
17
|
+
|
18
|
+
[tool.pytest.ini_options]
|
19
|
+
addopts = "-q --benchmark-min-rounds=30 --benchmark-columns=rounds,mean,median,stddev --benchmark-group-by=func"
|
20
|
+
|
21
|
+
[tool.bumpversion]
|
22
|
+
current_version = "0.2.19"
|
23
|
+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
24
|
+
serialize = ["{major}.{minor}.{patch}"]
|
25
|
+
search = "{current_version}"
|
26
|
+
replace = "{new_version}"
|
27
|
+
regex = false
|
28
|
+
ignore_missing_version = false
|
29
|
+
ignore_missing_files = false
|
30
|
+
tag = true
|
31
|
+
sign_tags = false
|
32
|
+
tag_name = "v{new_version}"
|
33
|
+
tag_message = "Bump version: {current_version} → {new_version}"
|
34
|
+
allow_dirty = false
|
35
|
+
commit = false
|
36
|
+
message = "Bump version: {current_version} → {new_version}"
|
37
|
+
moveable_tags = []
|
38
|
+
commit_args = ""
|
39
|
+
setup_hooks = []
|
40
|
+
pre_commit_hooks = []
|
41
|
+
post_commit_hooks = []
|
42
|
+
|
43
|
+
[dependency-groups]
|
44
|
+
dev = ["matplotlib>=3.10.1", "pytest>=8.3.5", "pytest-benchmark>=5.1.0"]
|
@@ -19,7 +19,7 @@ def prob(
|
|
19
19
|
The PDF evaluated at `x`. The output will have the broadcasted shapes of `x`, `mu`, and `sigma`.
|
20
20
|
"""
|
21
21
|
|
22
|
-
return _lax.exp(-0.5 * _lax.square((x - mu) / sigma)) / (
|
22
|
+
return _lax.exp(-0.5 * _lax.square((x - mu) / sigma)) / ( # pyright: ignore
|
23
23
|
sigma * _lax.sqrt(2.0 * _PI)
|
24
24
|
)
|
25
25
|
|
@@ -39,7 +39,7 @@ def logprob(
|
|
39
39
|
The log of the PDF evaluated at `x`. The output will have the broadcasted shapes of `x`, `mu`, and `sigma`.
|
40
40
|
"""
|
41
41
|
|
42
|
-
return -_lax.log(sigma * _lax.sqrt(2.0 * _PI)) - 0.5 * _lax.square((x - mu) / sigma)
|
42
|
+
return -_lax.log(sigma * _lax.sqrt(2.0 * _PI)) - 0.5 * _lax.square((x - mu) / sigma) # pyright: ignore
|
43
43
|
|
44
44
|
|
45
45
|
def uprob(
|
@@ -57,7 +57,7 @@ def uprob(
|
|
57
57
|
The uPDF evaluated at `x`. The output will have the broadcasted shapes of `x`, `mu`, and `sigma`.
|
58
58
|
"""
|
59
59
|
|
60
|
-
return _lax.exp(-0.5 * _lax.square((x - mu) / sigma)) / sigma
|
60
|
+
return _lax.exp(-0.5 * _lax.square((x - mu) / sigma)) / sigma # pyright: ignore
|
61
61
|
|
62
62
|
|
63
63
|
def ulogprob(
|
@@ -75,4 +75,4 @@ def ulogprob(
|
|
75
75
|
The log uPDF evaluated at `x`. The output will have the broadcasted shapes of `x`, `mu`, and `sigma`.
|
76
76
|
"""
|
77
77
|
|
78
|
-
return -_lax.log(sigma) - 0.5 * _lax.square((x - mu) / sigma)
|
78
|
+
return -_lax.log(sigma) - 0.5 * _lax.square((x - mu) / sigma) # pyright: ignore
|
@@ -1,8 +1,6 @@
|
|
1
|
-
from functools import partial
|
2
1
|
from typing import Any, Callable, Self, Tuple
|
3
2
|
|
4
3
|
import equinox as eqx
|
5
|
-
import jax
|
6
4
|
import jax.flatten_util as jfu
|
7
5
|
import jax.numpy as jnp
|
8
6
|
import jax.random as jr
|
@@ -61,7 +59,6 @@ class NormalizingFlow(Variational):
|
|
61
59
|
return draws
|
62
60
|
|
63
61
|
@eqx.filter_jit
|
64
|
-
@partial(jax.vmap, in_axes=(None, 0))
|
65
62
|
def eval(self, draws: Array) -> Array:
|
66
63
|
# Evaluate base density
|
67
64
|
variational_evals: Array = self.base.eval(draws)
|
bayinx-0.2.13/pyproject.toml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
[project]
|
2
|
-
name = "bayinx"
|
3
|
-
version = "0.2.13"
|
4
|
-
description = "Bayesian Inference with JAX"
|
5
|
-
readme = "README.md"
|
6
|
-
requires-python = ">=3.12"
|
7
|
-
dependencies = [
|
8
|
-
"equinox>=0.11.12",
|
9
|
-
"jax>=0.4.38",
|
10
|
-
"jaxtyping>=0.2.36",
|
11
|
-
"optax>=0.2.4",
|
12
|
-
]
|
13
|
-
|
14
|
-
[build-system]
|
15
|
-
requires = ["hatchling"]
|
16
|
-
build-backend = "hatchling.build"
|
17
|
-
|
18
|
-
[tool.pytest.ini_options]
|
19
|
-
addopts = "-q --benchmark-min-rounds=30 --benchmark-columns=rounds,mean,median,stddev --benchmark-group-by=func"
|
20
|
-
|
21
|
-
[dependency-groups]
|
22
|
-
dev = ["matplotlib>=3.10.1", "pytest>=8.3.5", "pytest-benchmark>=5.1.0"]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|