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
98ea338
Validate output of R distance function to ensure a single numeric val…
arrjon Dec 23, 2025
00b1c7b
Update pyabc/external/r/r_rpy2.py
arrjon Dec 23, 2025
8947f51
Update CI configuration and dependencies for improved compatibility a…
arrjon Feb 16, 2026
afdc37c
fix doc
arrjon Feb 16, 2026
59806b7
fix doc
arrjon Feb 16, 2026
4086e99
fix deps
arrjon Feb 16, 2026
706dac4
fix deps
arrjon Feb 16, 2026
a6ef2bd
add ruff
arrjon Feb 17, 2026
cb65563
add ruff
arrjon Feb 17, 2026
3ada847
fix ruff
arrjon Feb 17, 2026
1561837
fix ruff
arrjon Feb 17, 2026
50972b2
fix petab
arrjon Feb 17, 2026
9be546b
fix tox
arrjon Feb 17, 2026
53a8278
fix petab test
arrjon Feb 17, 2026
fce4603
update ci
arrjon Feb 17, 2026
a84bbbe
update r dep
arrjon Feb 17, 2026
e508c82
update r dep
arrjon Feb 17, 2026
8f611d1
update r dep
arrjon Feb 17, 2026
3110041
update r dep
arrjon Feb 17, 2026
aab8774
update r dep
arrjon Feb 17, 2026
c91152c
update r dep
arrjon Feb 17, 2026
b26c569
update r dep
arrjon Feb 17, 2026
23901c5
update r dep
arrjon Feb 17, 2026
d2fc5d5
update warnings
arrjon Feb 17, 2026
1030c3e
fix subprocess
arrjon Feb 17, 2026
10d9767
fix r2py
arrjon Feb 17, 2026
22a673d
fix r2py conversion [skip ci]
arrjon Feb 17, 2026
a38c504
fix r2py conversion
arrjon Feb 17, 2026
34e0493
fix petab.v1
arrjon Feb 17, 2026
e7c633d
fix petab.v1
arrjon Feb 17, 2026
f76b207
update toml file
arrjon Feb 17, 2026
1b7aae0
update notebooks
arrjon Feb 17, 2026
29dce1b
remove petabtests
arrjon Feb 17, 2026
3e382e8
remove petabtests
arrjon Feb 17, 2026
3079b89
fix tox
arrjon Feb 17, 2026
d5df51d
update amici dep
arrjon Feb 17, 2026
5180a24
update amici dep
arrjon Feb 17, 2026
f161f16
update amici dep
arrjon Feb 17, 2026
c55d7b2
update notebooks
arrjon Feb 17, 2026
98db9b7
update notebooks 2
arrjon Feb 17, 2026
f606155
annotations in inference_util
arrjon Feb 17, 2026
19a8a67
fix notebooks 2 deps
arrjon Feb 17, 2026
80cbf77
fix notebooks 2 deps
arrjon Feb 17, 2026
a1e3793
fix notebooks 2 deps
arrjon Feb 17, 2026
205d3c3
fix notebooks 2 julia
arrjon Feb 17, 2026
d724e68
fix notebooks 2 julia
arrjon Feb 17, 2026
c8b9d95
fix notebooks 2 julia
arrjon Feb 18, 2026
65e031c
fix notebooks 2 julia
arrjon Feb 18, 2026
625938e
fix notebooks 2 julia
arrjon Feb 18, 2026
891384c
fix notebooks 2 julia
arrjon Feb 18, 2026
716ac3a
check worker health before blocking on queue retrieval
arrjon Feb 18, 2026
437eee7
update distributed for python3.12
arrjon Feb 18, 2026
fcb137a
fix dask for python3.12
arrjon Feb 18, 2026
95f5a26
remove fix dask for python3.12
arrjon Feb 18, 2026
47d3542
fix python3.12 test
arrjon Feb 18, 2026
9dcdde4
fix python3.12 test
arrjon Feb 18, 2026
0193fe6
fix doc contact details [skip ci]
arrjon Feb 18, 2026
85d2f2f
Merge branch 'main' into develop
arrjon Feb 24, 2026
053ec3a
update readme codestyle [skip ci]
arrjon Feb 24, 2026
30ce814
Require amici<1.0
dweindl Feb 25, 2026
73538b2
Merge pull request #660 from ICB-DCM/amici_zero
arrjon Feb 26, 2026
0a6796d
Merge branch 'main' into develop
arrjon Feb 26, 2026
b8cf90f
Merge remote-tracking branch 'origin/develop' into develop
arrjon Feb 26, 2026
4b0e60a
Merge branch 'main' into develop
arrjon Mar 25, 2026
8ed2e00
Update for amici>=1.0 (#663)
dweindl Mar 25, 2026
229ac6c
update deps
arrjon Apr 14, 2026
e00fd9c
update deps
arrjon Apr 14, 2026
b5d185f
update changelog
arrjon Apr 14, 2026
6f596bd
move r deps to external
arrjon Apr 14, 2026
97e83a4
move r deps to external
arrjon Apr 14, 2026
0a9870d
clean install R in CI
arrjon Apr 14, 2026
7d0dea1
update julia deps
arrjon Apr 14, 2026
f48f895
fix julia pycall
arrjon Apr 14, 2026
ee259cb
fix julia pycall
arrjon Apr 14, 2026
e591b94
fix julia pycall
arrjon Apr 14, 2026
5c824bb
update deploy [skip ci]
arrjon Apr 14, 2026
ed7165c
fix R tests
arrjon Apr 14, 2026
0c531cc
fix R tests
arrjon Apr 14, 2026
5f2b297
Update test/base/test_integrated_model.py
arrjon Apr 14, 2026
b01ecd7
Prepare for python3.14 (#666)
arrjon May 28, 2026
80d0fc9
FIX broken docstring (#669)
kilianvolmer Jul 24, 2026
3340ca9
Merge branch 'main' into develop
arrjon Jul 24, 2026
ebebae5
fix multiprocessing context
arrjon Jul 24, 2026
c1777f4
fix multiprocessing context
arrjon Jul 24, 2026
1749237
fix ruff (#672)
arrjon Jul 28, 2026
e4a09cc
Add better time tracking (#668)
arrjon Jul 28, 2026
eb3a02e
Particle weights are now stored using the global normalization (#670)
arrjon Jul 30, 2026
56825d7
prepare 0.13.0
arrjon Jul 30, 2026
57099cb
update tests to 3.14
arrjon Jul 31, 2026
7e84b33
Documentation updates (#674)
kilianvolmer Jul 31, 2026
03d0224
rm conf
arrjon Jul 31, 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
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
matrix:
include:
# Fast PR matrix
- os: ubuntu-latest
python: "3.14"
toxenv: base
- os: ubuntu-latest
python: "3.13"
toxenv: base
Expand All @@ -26,42 +29,42 @@ jobs:
python: "3.11"
toxenv: base
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: visualization

# macOS sanity
- os: macos-latest
python: "3.11"
python: "3.14"
toxenv: mac

# Quality
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: quality
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: project
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: doc
- os: ubuntu-latest
python: "3.11"
toxenv: migrate

- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: external-R
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: external-other-simulators
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: petab
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: base-notebooks
- os: ubuntu-latest
python: "3.11"
python: "3.14"
toxenv: external-notebooks

steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ dask-worker-space
*.lock
*tmp*
*amici_models*

# macOS
.DS_Store
33 changes: 33 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@ Release Notes
=============


0.13 Series
...........

0.13.0 (2026-07-30)
-------------------

General:

* Add support for python3.14
* Add execution time profiling to the ABC-SMC run, reporting pure simulation
time, parallel-pipeline setup time, and in-between-iteration time,
including population-size calculation and distance-function adaptation.
The timings are also returned by ``run_generation``. Resolves #325.
* Minor bug fixes and improved typesetting.

Visualization:

* ``plot_walltime`` and ``plot_total_walltime`` now report the actual
per-generation walltimes and no longer include the idle time that passed
between a stored analysis and a later resumed run. Resolves #667.

Storage (breaking):

* Store the per-generation walltime in the database (new ``wall_time`` column,
database version 2). Databases created with older pyABC versions must be
migrated via ``abc-migrate`` before they can be resumed; for such databases
the walltime plots fall back to the previous, end-time-based behavior.
* Particle weights are now stored using the global normalization (weights sum
to 1 across all particles of all models, matching the in-memory
``Population`` representation). This is bundled into database version 2 and
handled by ``abc-migrate`` for existing databases. Resolves #47.


0.12 Series
...........

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
- 📄 **Cite**: [https://pyabc.rtfd.io/en/latest/cite.html](https://pyabc.rtfd.io/en/latest/cite.html)

#### Related Projects
- 🧠 **Neural Posterior Estimation**: [BayesFlow](https://bayesflow.org/main/_examples/From_ABC_to_BayesFlow.html)
- **Parameter Estimation with Likelihoods**: [pyPESTO](https://github.com/ICB-DCM/pyPESTO)
- **Neural Posterior Estimation**: [BayesFlow](https://bayesflow.org/main/_examples/From_ABC_to_BayesFlow.html)
41 changes: 34 additions & 7 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# serve to show the default.

import os
import subprocess
import sys

# If extensions (or modules to document with autodoc) are in another directory,
Expand All @@ -32,18 +33,20 @@
'sphinx.ext.autodoc',
# generate autodoc summaries
'sphinx.ext.autosummary',
# use mathjax for latex formulas
'sphinx.ext.mathjax',
# link to code
'sphinx.ext.viewcode',
# test snippets in the documentation
'sphinx.ext.doctest',
# link to external urls
'sphinx.ext.extlinks',
# link to other projects' docs
'sphinx.ext.intersphinx',
# use mathjax for latex formulas
'sphinx.ext.mathjax',
# support numpy and google style docstrings
'sphinx.ext.napoleon',
# support todo items
'sphinx.ext.todo',
# test snippets in the documentation
'sphinx.ext.doctest',
# link to code
'sphinx.ext.viewcode',
# source parser for jupyter notebook files
'nbsphinx',
# code highlighting in jupyter cells
Expand All @@ -68,7 +71,7 @@
'numpy': ('https://numpy.org/devdocs/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/dev', None),
'petab': ('https://petab.readthedocs.io/en/stable/', None),
'petab': ('https://petab.readthedocs.io/en/latest/', None),
'amici': ('https://amici.readthedocs.io/en/latest/', None),
'sklearn': ('https://scikit-learn.org/stable/', None),
}
Expand Down Expand Up @@ -99,6 +102,30 @@
#
# The short X.Y version.


# Resolve the current branch name
def get_branch():
# Read the Docs sets this automatically ("latest", "stable", branch name...)
rtd_version = os.environ.get('READTHEDOCS_VERSION')
if rtd_version and rtd_version not in ('latest', 'stable'):
return rtd_version
try:
return subprocess.check_output(
['git', 'rev-parse', '--abbrev-ref', 'HEAD'], text=True
).strip()
except Exception:
return 'main'


# Set up links that resolve to the branch of the documentation
branch = get_branch()
extlinks = {
'repository': (
f'https://github.com/ICB-DCM/pyABC/blob/{branch}/%s',
'%s',
),
}

import pyabc # noqa: E402

version = pyabc.__version__
Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ pyABC - distributed, likelihood-free inference
:target: https://badge.fury.io/py/pyabc
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3257587.svg
:target: https://doi.org/10.5281/zenodo.3257587
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://img.shields.io/badge/code%20style-ruff-41B5BE.svg
:target: https://github.com/astral-sh/ruff

:Release: |version|
:Source code: https://github.com/icb-dcm/pyabc
Expand Down
19 changes: 5 additions & 14 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Install
Preparation
-----------

This package requires Python 3.8 or later.
This package requires Python 3.11 or later.
The package is continuously tested on Linux, and in parts on iOS,
via GitHub Actions.

Expand Down Expand Up @@ -77,20 +77,11 @@ home directory with

.. _anacondaCluster:

Installing Anaconda on a Cluster environment
--------------------------------------------

To install `Anaconda <https://anaconda.com/products/distribution>`_, run::

wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
bash Anaconda3-2021.11-Linux-x86_64.sh

and follow the installation guide.
Replace the "2021.11" by the most recent version of Anaconda, see
https://repo.anaconda.com/archive.
Installing Miniconda on a Cluster environment
---------------------------------------------

`Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_
provides an alternative, minimal installer for conda, including
provides a minimal installer for conda, including
only conda, Python, and some core and useful packages. Install the latest
version via::

Expand All @@ -102,7 +93,7 @@ version via::
Optional dependencies
---------------------

pyABC has various optional dependencies, see `setup.cfg`.
pyABC has various optional dependencies, see :repository:`pyproject.toml`.

In particular, pyABC has optional interfaces to the :ref:`R <api_external_r>`
and :ref:`Julia <api_external_julia>` languages, see the API documentation
Expand Down
6 changes: 3 additions & 3 deletions pyabc/acceptor/acceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ class StochasticAcceptor(Acceptor):

def __init__(
self,
pdf_norm_method: Callable = None,
pdf_norm_method: Callable | None = None,
apply_importance_weighting: bool = True,
log_file: str = None,
log_file: str | None = None,
):
"""
Parameters
Expand Down Expand Up @@ -429,7 +429,7 @@ def _update(
self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
prev_temp: float = None,
prev_temp: float | None = None,
acceptance_rate: float = 1.0,
):
"""
Expand Down
5 changes: 4 additions & 1 deletion pyabc/acceptor/pdf_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def pdf_norm_max_found(
prev_pdf_norm = -np.inf

# take maximum over all normalizations
pdf_norm = max(prev_pdf_norm, *pdfs)
if len(pdfs) == 0:
pdf_norm = prev_pdf_norm
else:
pdf_norm = max(prev_pdf_norm, float(pdfs.max()))

return pdf_norm

Expand Down
12 changes: 6 additions & 6 deletions pyabc/copasi/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ class BasicoModel(Model):
def __init__(
self,
sbml_file: str,
changes: dict[str, float] = None,
changes: dict[str, float] | None = None,
change_unit: bool = True,
method: str = 'stochastic',
t0: float = None,
duration: float = None,
num_steps: int = None,
t0: float | None = None,
duration: float | None = None,
num_steps: int | None = None,
automatic: bool = True,
use_numbers: bool = False,
output: list[str] = None,
model_name: str = None,
output: list[str] | None = None,
model_name: str | None = None,
):
"""
Parameters
Expand Down
22 changes: 11 additions & 11 deletions pyabc/distance/aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class AggregatedDistance(Distance):
def __init__(
self,
distances: list[Distance | Callable],
weights: list | dict = None,
factors: list | dict = None,
weights: list | dict | None = None,
factors: list | dict | None = None,
):
"""
Parameters
Expand Down Expand Up @@ -126,8 +126,8 @@ def __call__(
self,
x: dict,
x_0: dict,
t: int = None,
par: dict = None,
t: int | None = None,
par: dict | None = None,
) -> float:
"""
Applies all distance functions and computes the weighted sum of all
Expand Down Expand Up @@ -221,21 +221,21 @@ class AdaptiveAggregatedDistance(AggregatedDistance):
def __init__(
self,
distances: list[Distance],
initial_weights: list = None,
factors: list | dict = None,
initial_weights: list | None = None,
factors: list | dict | None = None,
adaptive: bool = True,
scale_function: Callable = None,
log_file: str = None,
scale_function: Callable | None = None,
log_file: str | None = None,
):
super().__init__(distances=distances)
self.initial_weights: list = initial_weights
self.factors: list | dict = factors
self.initial_weights: list | None = initial_weights
self.factors: list | dict | None = factors
self.adaptive: bool = adaptive
self.x_0: dict | None = None
if scale_function is None:
scale_function = span
self.scale_function: Callable = scale_function
self.log_file: str = log_file
self.log_file: str | None = log_file

def requires_calibration(self) -> bool:
return self.initial_weights is None or any(
Expand Down
Loading
Loading