Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
648f7a2
feat(flow): implement triangular transform
aseyboldt Aug 20, 2026
552df58
feat(flow): implement triangular transform in numba and rust
aseyboldt Sep 17, 2026
fcfaf96
feat(flow): add linear shift shortcut in triangular
aseyboldt Sep 17, 2026
ecbf4f1
feat(flow): add line search in triangular LM
aseyboldt Sep 17, 2026
67fdf67
feat(flow)d axact preconditioning blocks in LM
aseyboldt Sep 17, 2026
8cf0840
feat(flow): use rust triangular in leapfrogs and clean docs
aseyboldt Sep 17, 2026
ed4ce39
feat: implement stan sparsity detection
aseyboldt Sep 17, 2026
08bfa1a
feat: sparsity and factorization in compiled models
aseyboldt Sep 17, 2026
6f225de
feat(flow): better verbose output and optional cholesky jitter
aseyboldt Sep 17, 2026
02bc027
feat: support KeyboardInterrupt in hessian calculation
aseyboldt Sep 17, 2026
3085162
feat: forward keyboard interrupts to flow training
aseyboldt Sep 17, 2026
1ac0255
feat: diagnostic plots for the fitted flows
aseyboldt Sep 17, 2026
408863f
feat: describe new flows in verbose mode
aseyboldt Sep 17, 2026
d41b952
feat: improve flow_influence estimation
aseyboldt Sep 17, 2026
66a2335
style: some ruff fixes
aseyboldt Sep 17, 2026
0967873
feat: add a little more verbose optimizer output
aseyboldt Sep 17, 2026
5596b4b
feat: add some optional diagnostics at verbose = 3
aseyboldt Sep 17, 2026
fa248f7
fix: incorrect sample_stats.unconstrained_parameter in stan models
aseyboldt Sep 17, 2026
1ef5e38
feat: add flow nn_width capacity diagnostics
aseyboldt Sep 17, 2026
2d1aa3a
test: add lmopt tests
aseyboldt Sep 17, 2026
4e74d5f
feat(flow): add hermite features and predictor normalization
aseyboldt Sep 17, 2026
8d28a04
feat(flow): implement fisher regularization
aseyboldt Oct 1, 2026
6f180f6
feat(flow): LM steps in rust
aseyboldt Oct 1, 2026
097c11e
feat(flow): improve numerical stability of exact lm blocks
aseyboldt Oct 1, 2026
3011de5
feat(flow): implement flow optimization in rust
aseyboldt Oct 1, 2026
c9d116c
perf: speed up flow LM fitting
aseyboldt Oct 1, 2026
43dbc6c
feat(flow): implement limited memory preconditioner
aseyboldt Oct 1, 2026
516c79a
feat(flow): more robust diagonal early windows
aseyboldt Oct 1, 2026
9b09868
perf: parallel stan sparsity detection
aseyboldt Oct 1, 2026
af4215e
feat(flow): change flow defaults
aseyboldt Oct 1, 2026
f616d13
chore(release): prepare 0.17.0
aseyboldt Oct 1, 2026
2a72735
style: formatting fixes
aseyboldt Oct 2, 2026
3691ff9
feat(flow): add tangent SAS transformer
aseyboldt Oct 5, 2026
b9229a6
feat(flow): add option to disable b parameter of tangent sas
aseyboldt Oct 5, 2026
7ee8039
feat: support stanli as backend for stan models
aseyboldt Oct 5, 2026
58bba7e
perf: change to thin lto
aseyboldt Oct 5, 2026
3e79627
perf(flow): iterate over draws in batches
aseyboldt Oct 5, 2026
7ef4c65
perf(flow): use dynamic jet size
aseyboldt Oct 5, 2026
d29ac60
perf(flow): speed up triangular block_rows
aseyboldt Oct 5, 2026
202a1d8
perf(flow): compute hessian of transformer directly
aseyboldt Oct 5, 2026
680eb88
perf(flow): precompute lookup tables
aseyboldt Oct 5, 2026
bab35f6
refactor: restructure rust triangular code
aseyboldt Oct 5, 2026
ae657d7
fix(flow): make triangular training deterministic
aseyboldt Oct 5, 2026
4c9091f
feat(flow): better initial diagonal
aseyboldt Oct 5, 2026
2f99e20
feat(flow): use train/test split during training
aseyboldt Oct 5, 2026
cf37084
feat(flow): expose gamma bound
aseyboldt Oct 8, 2026
62a968b
feat(flow): optionally sinh squash MLP inputs
aseyboldt Oct 8, 2026
40110f3
feat(flow): implement l2 regularization
aseyboldt Oct 8, 2026
78c0cc8
feat(flow): gelu activation function
aseyboldt Oct 9, 2026
9acfba1
feat(flow): first fit of flow is linear only
aseyboldt Oct 9, 2026
03514b8
feat(flow): fit triangular flows without jax
aseyboldt Oct 9, 2026
3a58a3b
style: some ruff fixes
aseyboldt Oct 12, 2026
1bad103
perf(flow): reduce max memory usage
aseyboldt Oct 12, 2026
eff7a84
feat: remove fisher regularization
aseyboldt Oct 12, 2026
df01e75
feat(flow): improve ridge penalty
aseyboldt Oct 12, 2026
6c2a5ba
feat(flow): improve verbose output
aseyboldt Oct 12, 2026
d61535e
feat(flow): allow multiple linear fits and fix nonlinear-parameters
aseyboldt Oct 13, 2026
0f288c7
feat(flow): restructure transformers and add asymmetric_sas
aseyboldt Oct 13, 2026
a47bad7
feat(flow): add linear skip to scale parameter
aseyboldt Oct 13, 2026
0ee3149
feat(flow): add refit_diag option
aseyboldt Oct 13, 2026
47a1cd1
refactor(flow): traits for Conditioner and Transformer
aseyboldt Oct 15, 2026
414cba2
perf(flow): use the new conditioner trait for sampling
aseyboldt Oct 15, 2026
7853964
fix: better error message on stan usage without stan support
aseyboldt Oct 15, 2026
adec47d
chore: update pyo3 and drop pythonize dependency
aseyboldt Oct 15, 2026
45866f7
fix: use rust flow in triangular diagnostics
aseyboldt Oct 15, 2026
4bb6b2b
test: more sampler accuracy tests
aseyboldt Oct 15, 2026
65224e5
feat(flow): implement scale_squash parameter
aseyboldt Oct 15, 2026
1a801d0
fix: manually enable empty rayon pool in wasm
aseyboldt Oct 15, 2026
d9828fa
ci: mark flow tests
aseyboldt Oct 15, 2026
1d757cb
chore(release): prepare release with changelog
aseyboldt Oct 15, 2026
992d990
style: add rustfmt to pre-commit
aseyboldt Oct 15, 2026
c002f65
ci: add python 3.15 wheel builds
aseyboldt Oct 15, 2026
425359d
feat(walnuts): support new walnuts options as dict
aseyboldt Oct 15, 2026
e26fba0
feat(flow): rebuild flow if diagonal is better than old flow
aseyboldt Oct 15, 2026
aef8fec
feat(flow): add monte carlo estimate of diagonal preconditioner
aseyboldt Oct 15, 2026
6d0aae7
fix(flow): remove python overhead from more flow sampling
aseyboldt Oct 15, 2026
af621a5
chore(flow): move metis to rust code
aseyboldt Oct 15, 2026
8f86582
temp: use github nuts-rs until next release
aseyboldt Nov 5, 2026
61ff3bb
fix: update the reference draws
aseyboldt Nov 6, 2026
25790ff
fix: pin jax to <0.12 for asdex
aseyboldt Nov 6, 2026
799b1c1
test: fix minor test failures
aseyboldt Nov 6, 2026
698e017
fix(flow): earlier errors for missing dependencies
aseyboldt Nov 6, 2026
dbed9d6
feat: improve optional dependency sets
aseyboldt Nov 6, 2026
d2a9e1f
fix(flow): linear flow fits should not repeat endlessly
aseyboldt Nov 6, 2026
660ba08
chore: switch from pyarrow to arro3
aseyboldt Dec 3, 2026
8173e6f
fix: c_int vs int64 mismatch in ABI that luckily worked anyway
aseyboldt Dec 3, 2026
7b0fef3
fix: avoid zero-sized jax arrays
aseyboldt Dec 3, 2026
7c6ce44
fix: skip tests with jax macos bug
aseyboldt Dec 3, 2026
06e333e
fix(triangular): avoid unused jax import for rust flow
aseyboldt Dec 3, 2026
f257096
ci: avoid jax bug on arm
aseyboldt Dec 3, 2026
21e3e1b
ci: only test beginning of chain against reference draws
aseyboldt Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 46 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@ jobs:
3.12
3.13
3.14
3.15
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
env:
# Old glibc headers hide `siginfo_t` from the vendored METIS
# (GKlib defines a bare `_XOPEN_SOURCE`).
CFLAGS_x86_64_unknown_linux_gnu: "-D_GNU_SOURCE"
CFLAGS_aarch64_unknown_linux_gnu: "-D_GNU_SOURCE"
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --interpreter 3.12 3.13 3.14 --zig
args: --release --out dist --interpreter 3.12 3.13 3.14 3.15 --zig
sccache: false
manylinux: auto
before-script-linux: |
Expand All @@ -66,7 +72,7 @@ jobs:
matrix:
target: [x86_64, aarch64]
suite: [stan, pymc, flow]
python-version: ["3.12", "3.13", "3.14"]
python-version: ["3.12", "3.13", "3.14", "3.15"]
include:
- target: x86_64
runner: ubuntu-22.04
Expand All @@ -87,6 +93,11 @@ jobs:
with:
name: wheels-linux-${{ matrix.target }}
path: dist
# arviz < 1 needs h5py, which has no Python 3.15 wheel yet, so it is
# built from source against the system HDF5.
- name: Install HDF5
if: matrix.python-version == '3.15'
run: sudo apt-get update && sudo apt-get install -y libhdf5-dev
- name: pytest
shell: bash
run: |
Expand All @@ -101,7 +112,7 @@ jobs:
pytest -m "stan and not flow" --arraydiff
;;
pymc)
uv pip install 'nutpie[pymc]' jax --constraint .github/uv-constraints-main.txt
uv pip install 'nutpie[pymc,pymc-jax]' --constraint .github/uv-constraints-main.txt
pytest -m "pymc and not flow" --arraydiff
;;
flow)
Expand Down Expand Up @@ -157,7 +168,11 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
env:
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUSTFLAGS: "-C link-arg=-sSIDE_MODULE=2"
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUSTFLAGS: "-C link-arg=-sSIDE_MODULE=2 -C link-arg=-sSUPPORT_LONGJMP=wasm"
# The vendored METIS needs the flags Pyodide builds C extensions
# with: cc-rs does not use -fPIC on wasm, but a side module needs
# it, and GKlib's setjmp must use wasm exceptions like Pyodide.
CFLAGS_wasm32_unknown_emscripten: "-fPIC -fwasm-exceptions -sSUPPORT_LONGJMP=wasm"
with:
target: ${{ matrix.platform.target }}
args: --release --no-default-features --out dist -i ${{ env.PYTHON_VERSION }}
Expand All @@ -178,7 +193,8 @@ jobs:
pyodide venv .venv
source .venv/bin/activate
pip install nutpie --no-index --no-deps --find-links dist --force-reinstall
pip install nutpie pytest
# Only the plotting tests need matplotlib
pip install nutpie pytest matplotlib
python -c "import nutpie; print(nutpie.__version__)"
python -m pytest -rs

Expand Down Expand Up @@ -265,6 +281,7 @@ jobs:
3.12
3.13
3.14
3.15
architecture: x64
- name: Install uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
Expand All @@ -284,7 +301,7 @@ jobs:
LIBCLANG_PATH: ${{ runner.temp }}/llvm/lib
with:
target: x64
args: --release --out dist --interpreter 3.12 3.13 3.14
args: --release --out dist --interpreter 3.12 3.13 3.14 3.15
sccache: false
- name: Upload wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand All @@ -301,7 +318,14 @@ jobs:
fail-fast: false
matrix:
suite: [stan, pymc, flow]
python-version: ["3.12", "3.13", "3.14"]
python-version: ["3.12", "3.13", "3.14", "3.15"]
# These suites need h5py (through arviz < 1), which has no Python
# 3.15 wheel yet and no easy source build on Windows.
exclude:
- suite: pymc
python-version: "3.15"
- suite: flow
python-version: "3.15"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down Expand Up @@ -331,7 +355,7 @@ jobs:
pytest -m "stan and not flow" --arraydiff
;;
pymc)
uv pip install "nutpie[pymc]" jax --constraint .github/uv-constraints-main.txt
uv pip install "nutpie[pymc,pymc-jax]" --constraint .github/uv-constraints-main.txt
pytest -m "pymc and not flow" --arraydiff
;;
flow)
Expand All @@ -349,7 +373,7 @@ jobs:
platform:
- runner: macos-15-intel
target: x86_64
- runner: macos-14
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -361,6 +385,7 @@ jobs:
3.12
3.13
3.14
3.15
- name: Install uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
Expand All @@ -372,7 +397,7 @@ jobs:
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --interpreter 3.12 3.13 3.14 --zig
args: --release --out dist --interpreter 3.12 3.13 3.14 3.15 --zig
sccache: false
- name: Upload wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand All @@ -390,12 +415,12 @@ jobs:
matrix:
target: [x86_64, aarch64]
suite: [stan, pymc, flow]
python-version: ["3.12", "3.13", "3.14"]
python-version: ["3.12", "3.13", "3.14", "3.15"]
include:
- target: x86_64
runner: macos-15-intel
- target: aarch64
runner: macos-14
runner: macos-latest
exclude:
# numba isn't available on macOS x86_64
- target: x86_64
Expand All @@ -417,6 +442,13 @@ jobs:
with:
name: wheels-macos-${{ matrix.target }}
path: dist
# arviz < 1 needs h5py, which has no Python 3.15 wheel yet, so it is
# built from source against Homebrew's HDF5.
- name: Install HDF5
if: matrix.python-version == '3.15'
run: |
brew install hdf5
echo "HDF5_DIR=$(brew --prefix hdf5)" >> "$GITHUB_ENV"
- name: pytest
run: |
set -e
Expand All @@ -430,7 +462,7 @@ jobs:
pytest -m "stan and not flow" --arraydiff
;;
pymc)
uv pip install 'nutpie[pymc]' jax --constraint .github/uv-constraints-main.txt
uv pip install 'nutpie[pymc,pymc-jax]' --constraint .github/uv-constraints-main.txt
pytest -m "pymc and not flow" --arraydiff
;;
flow)
Expand Down Expand Up @@ -585,5 +617,5 @@ jobs:
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
files: |
wasm-wheels/*.whl
wasm-wheels-*/*.whl
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
Loading
Loading