Model Selection
In this notebook, the model selection capabilities of pyPESTO are demonstrated, which facilitate the selection of the best model from a set of possible models. This includes examples of forward, backward, and brute force methods, as well as criteria such as AIC, AICc, and BIC. Various additional options and convenience methods are also demonstrated.
All specification files use the PEtab Select format, which is a model selection extension to the parameter estimation specification format PEtab.
Dependencies can be installed with pip3 install pypesto[select].
In this notebook:
Example Model
This example involves a reaction system with two species (A and B), with their growth, conversion and decay rates controlled by three parameters (\(\theta_1\), \(\theta_2\), and \(\theta_3\)). Many different hypotheses will be considered, which are described in the model specifications file. There, a parameter fixed to zero indicates that the associated reaction(s) should not be in the model which resembles a hypothesis.
Synthetic measurement data is used here, which was generated with the “true” model. The comprehensive model includes additional behavior involving a third parameter (\(\theta_3\)). Hence, during model selection, models without \(\theta_3=0\) should be preferred.
Model Space Specifications File
The model selection specification file can be written in the following compressed format.
model_subspace_id |
petab_yaml |
\(\theta_1\) |
\(\theta_2\) |
\(\theta_3\) |
|---|---|---|---|---|
M1 |
example_modelSelection.yaml |
0;estimate |
0;estimate |
0;estimate |
Alternatively, models can be explicitly specified. The below table is equivalent to the above table.
model_subspace_id |
petab_yaml |
\(\theta_1\) |
\(\theta_2\) |
\(\theta_3\) |
|---|---|---|---|---|
M1_0 |
example_modelSelection.yaml |
0 |
0 |
0 |
M1_1 |
example_modelSelection.yaml |
0 |
0 |
estimate |
M1_2 |
example_modelSelection.yaml |
0 |
estimate |
0 |
M1_3 |
example_modelSelection.yaml |
estimate |
0 |
0 |
M1_4 |
example_modelSelection.yaml |
0 |
estimate |
estimate |
M1_5 |
example_modelSelection.yaml |
estimate |
0 |
estimate |
M1_6 |
example_modelSelection.yaml |
estimate |
estimate |
0 |
M1_7 |
example_modelSelection.yaml |
estimate |
estimate |
estimate |
Either of the above tables (as TSV files) are valid inputs. Any combinations of cells in the compressed or explicit format is also acceptable, including the following example.
model_subspace_id |
petab_yaml |
\(\theta_1\) |
\(\theta_2\) |
\(\theta_3\) |
|---|---|---|---|---|
M1 |
example_modelSelection.yaml |
0;estimate |
0;estimate |
0 |
M2 |
example_modelSelection.yaml |
0;estimate |
0;estimate |
estimate |
Due to the topology of the example model, setting \(\theta_1\) to zero can result in a model with no dynamics. Hence, for this example, some parameters are set to non-zero fixed values. These parameters are considered as fixed (not estimated) values in criterion (e.g. AIC) calculations.
The model specification table used in this notebook is shown below.
[1]:
import pandas as pd
from IPython.display import HTML, display
df = pd.read_csv("model_selection/model_space.tsv", sep="\t")
display(HTML(df.to_html(index=False)))
| model_subspace_id | model_subspace_petab_yaml | k1 | k2 | k3 |
|---|---|---|---|---|
| M1_0 | example_modelSelection.yaml | 0 | 0 | 0 |
| M1_1 | example_modelSelection.yaml | 0.2 | 0.1 | estimate |
| M1_2 | example_modelSelection.yaml | 0.2 | estimate | 0 |
| M1_3 | example_modelSelection.yaml | estimate | 0.1 | 0 |
| M1_4 | example_modelSelection.yaml | 0.2 | estimate | estimate |
| M1_5 | example_modelSelection.yaml | estimate | 0.1 | estimate |
| M1_6 | example_modelSelection.yaml | estimate | estimate | 0 |
| M1_7 | example_modelSelection.yaml | estimate | estimate | estimate |
Forward Selection, Multiple Searches
Here, we show a typical workflow for model selection. First, a PEtab Select problem is created, which is used to initialize a pyPESTO model selection problem.
[2]:
# Disable some logged messages that make the model selection log more
# difficult to read.
import tqdm
def nop(it, *a, **k):
return it
tqdm.tqdm = nop
[3]:
import petab_select
from petab_select import ESTIMATE, Criterion, Method
import pypesto.select
petab_select_problem = petab_select.Problem.from_yaml(
"model_selection/petab_select_problem.yaml"
)
[4]:
import logging
import pypesto.logging
pypesto.logging.log(level=logging.WARNING, name="pypesto.petab", console=True)
pypesto_select_problem_1 = pypesto.select.Problem(
petab_select_problem=petab_select_problem
)
Models can be selected with a model selection algorithm (here: forward) and a comparison criterion (here: AIC). The forward method starts with the smallest model. Within each following iteration it tests all models with one additional estimated parameter.
To perform a single iteration, use select as shown below. Later in the notebook, select_to_completion is demonstrated, which performs multiple consecutive iterations automatically.
As no initial model is specified here, a virtual initial model with no estimated parameters is automatically used to find the “smallest” (in terms of number of estimated parameters) models. In this example, this is the model M1_0, which has no estimated parameters.
[5]:
# Reduce notebook runtime
model_problem_options = {
"minimize_options": {
"n_starts": 10,
"filename": None,
"progress_bar": False,
},
}
best_model_1, _ = pypesto_select_problem_1.select(
method=Method.FORWARD,
criterion=Criterion.AIC,
model_problem_options=model_problem_options,
)
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
2026-03-09 16:40:31.519 - amici.importers.petab.v1._sbml_import - INFO - Importing model ...
2026-03-09 16:40:31.519 - amici.importers.petab.v1._sbml_import - INFO - Validating PEtab problem ...
Visualization table not available. Skipping.
2026-03-09 16:40:31.528 - amici.importers.petab.v1._sbml_import - INFO - Model name is 'caroModel_linear'.
Writing model code to '/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear'.
2026-03-09 16:40:31.529 - amici.importers.petab.v1._sbml_import - INFO - Species: 2
2026-03-09 16:40:31.530 - amici.importers.petab.v1._sbml_import - INFO - Global parameters: 5
2026-03-09 16:40:31.531 - amici.importers.petab.v1._sbml_import - INFO - Reactions: 3
2026-03-09 16:40:31.563 - amici.importers.petab.v1._sbml_import - INFO - Number of observables: 1
2026-03-09 16:40:31.564 - amici.importers.petab.v1._sbml_import - DEBUG - Adding output parameters to model: ['noiseParameter1_obs_x2']
2026-03-09 16:40:31.565 - amici.importers.petab.v1._sbml_import - DEBUG - Adding initial assignments for []
2026-03-09 16:40:31.567 - amici.importers.petab.v1._sbml_import - DEBUG - Fixed parameters are ['observable_x2']
2026-03-09 16:40:31.569 - amici.importers.petab.v1._sbml_import - INFO - Overall fixed parameters: 1
2026-03-09 16:40:31.569 - amici.importers.petab.v1._sbml_import - INFO - Variable parameters: 5
2026-03-09 16:40:31.583 - amici.importers.sbml - DEBUG - Finished processing SBML annotations ++ (2.92E-04s)
2026-03-09 16:40:31.594 - amici.importers.sbml - DEBUG - Finished gathering local SBML symbols ++ (2.47E-03s)
2026-03-09 16:40:31.602 - amici.importers.sbml - DEBUG - Finished processing SBML parameters ++ (4.00E-04s)
2026-03-09 16:40:31.610 - amici.importers.sbml - DEBUG - Finished processing SBML compartments ++ (7.76E-05s)
2026-03-09 16:40:31.624 - amici.importers.sbml - DEBUG - Finished processing SBML species initials+++ (4.71E-04s)
2026-03-09 16:40:31.631 - amici.importers.sbml - DEBUG - Finished processing SBML rate rules +++ (1.41E-05s)
2026-03-09 16:40:31.631 - amici.importers.sbml - DEBUG - Finished processing SBML species ++ (1.45E-02s)
2026-03-09 16:40:31.640 - amici.importers.sbml - DEBUG - Finished processing SBML reactions ++ (7.54E-04s)
2026-03-09 16:40:31.648 - amici.importers.sbml - DEBUG - Finished processing SBML rules ++ (2.15E-04s)
2026-03-09 16:40:31.655 - amici.importers.sbml - DEBUG - Finished processing SBML events ++ (6.08E-05s)
2026-03-09 16:40:31.663 - amici.importers.sbml - DEBUG - Finished processing SBML initial assignments++ (2.13E-05s)
2026-03-09 16:40:31.671 - amici.importers.sbml - DEBUG - Finished processing SBML species references++ (9.66E-05s)
2026-03-09 16:40:31.671 - amici.importers.sbml - DEBUG - Finished importing SBML + (9.43E-02s)
2026-03-09 16:40:31.684 - amici.importers.sbml - DEBUG - Finished processing observation model + (5.79E-03s)
2026-03-09 16:40:31.736 - amici._symbolic.de_model - DEBUG - Finished simplifying Jy ++++ (5.67E-03s)
2026-03-09 16:40:31.737 - amici._symbolic.de_model - DEBUG - Finished computing Jy +++ (1.34E-02s)
2026-03-09 16:40:31.765 - amici._symbolic.de_model - DEBUG - Finished simplifying y ++++ (5.53E-05s)
2026-03-09 16:40:31.766 - amici._symbolic.de_model - DEBUG - Finished computing y +++ (8.18E-03s)
2026-03-09 16:40:31.781 - amici._symbolic.de_model - DEBUG - Finished simplifying sigmay ++++ (5.19E-05s)
2026-03-09 16:40:31.782 - amici._symbolic.de_model - DEBUG - Finished computing sigmay +++ (8.77E-03s)
2026-03-09 16:40:31.783 - amici.exporters.sundials.de_export - DEBUG - Finished writing Jy.cpp ++ (6.62E-02s)
2026-03-09 16:40:31.823 - amici._symbolic.de_model - DEBUG - Finished simplifying dJydsigma ++++ (1.83E-03s)
2026-03-09 16:40:31.824 - amici._symbolic.de_model - DEBUG - Finished computing dJydsigma +++ (2.75E-02s)
2026-03-09 16:40:31.826 - amici.exporters.sundials.de_export - DEBUG - Finished writing dJydsigma.cpp++ (3.56E-02s)
2026-03-09 16:40:31.864 - amici._symbolic.de_model - DEBUG - Finished simplifying dJydy ++++ (1.70E-03s)
2026-03-09 16:40:31.865 - amici._symbolic.de_model - DEBUG - Finished computing dJydy +++ (2.28E-02s)
2026-03-09 16:40:31.870 - amici.exporters.sundials.de_export - DEBUG - Finished writing dJydy.cpp ++ (3.59E-02s)
2026-03-09 16:40:31.891 - amici._symbolic.de_model - DEBUG - Finished simplifying Jz ++++ (4.76E-05s)
2026-03-09 16:40:31.891 - amici._symbolic.de_model - DEBUG - Finished computing Jz +++ (7.73E-03s)
2026-03-09 16:40:31.892 - amici.exporters.sundials.de_export - DEBUG - Finished writing Jz.cpp ++ (1.43E-02s)
2026-03-09 16:40:31.920 - amici._symbolic.de_model - DEBUG - Finished simplifying dJzdsigma ++++ (4.57E-05s)
2026-03-09 16:40:31.920 - amici._symbolic.de_model - DEBUG - Finished computing dJzdsigma +++ (1.46E-02s)
2026-03-09 16:40:31.921 - amici.exporters.sundials.de_export - DEBUG - Finished writing dJzdsigma.cpp++ (2.15E-02s)
2026-03-09 16:40:31.949 - amici._symbolic.de_model - DEBUG - Finished simplifying dJzdz ++++ (4.62E-05s)
2026-03-09 16:40:31.949 - amici._symbolic.de_model - DEBUG - Finished computing dJzdz +++ (1.48E-02s)
2026-03-09 16:40:31.950 - amici.exporters.sundials.de_export - DEBUG - Finished writing dJzdz.cpp ++ (2.14E-02s)
2026-03-09 16:40:31.974 - amici._symbolic.de_model - DEBUG - Finished simplifying Jrz ++++ (4.48E-05s)
2026-03-09 16:40:31.975 - amici._symbolic.de_model - DEBUG - Finished computing Jrz +++ (8.72E-03s)
2026-03-09 16:40:31.976 - amici.exporters.sundials.de_export - DEBUG - Finished writing Jrz.cpp ++ (1.70E-02s)
2026-03-09 16:40:32.004 - amici._symbolic.de_model - DEBUG - Finished simplifying dJrzdsigma ++++ (6.06E-05s)
2026-03-09 16:40:32.005 - amici._symbolic.de_model - DEBUG - Finished computing dJrzdsigma +++ (1.48E-02s)
2026-03-09 16:40:32.006 - amici.exporters.sundials.de_export - DEBUG - Finished writing dJrzdsigma.cpp++ (2.18E-02s)
2026-03-09 16:40:32.034 - amici._symbolic.de_model - DEBUG - Finished simplifying dJrzdz ++++ (4.35E-05s)
2026-03-09 16:40:32.035 - amici._symbolic.de_model - DEBUG - Finished computing dJrzdz +++ (1.54E-02s)
2026-03-09 16:40:32.036 - amici.exporters.sundials.de_export - DEBUG - Finished writing dJrzdz.cpp++ (2.24E-02s)
2026-03-09 16:40:32.057 - amici._symbolic.de_model - DEBUG - Finished simplifying root ++++ (4.09E-05s)
2026-03-09 16:40:32.058 - amici._symbolic.de_model - DEBUG - Finished computing root +++ (7.65E-03s)
2026-03-09 16:40:32.058 - amici.exporters.sundials.de_export - DEBUG - Finished writing root.cpp ++ (1.46E-02s)
2026-03-09 16:40:32.089 - amici._symbolic.de_model - DEBUG - Finished simplifying w +++++ (8.55E-04s)
2026-03-09 16:40:32.089 - amici._symbolic.de_model - DEBUG - Finished computing w ++++ (9.08E-03s)
2026-03-09 16:40:32.107 - amici._symbolic.de_model - DEBUG - Finished simplifying dwdp ++++ (3.21E-04s)
2026-03-09 16:40:32.108 - amici._symbolic.de_model - DEBUG - Finished computing dwdp +++ (3.46E-02s)
2026-03-09 16:40:32.134 - amici._symbolic.de_model - DEBUG - Finished simplifying dwdx ++++ (5.47E-04s)
2026-03-09 16:40:32.135 - amici._symbolic.de_model - DEBUG - Finished computing dwdx +++ (1.77E-02s)
2026-03-09 16:40:32.159 - amici._symbolic.de_model - DEBUG - Finished simplifying dwdw ++++ (4.08E-05s)
2026-03-09 16:40:32.159 - amici._symbolic.de_model - DEBUG - Finished computing dwdw +++ (1.66E-02s)
2026-03-09 16:40:32.162 - amici.exporters.sundials.de_export - DEBUG - Finished writing dwdp.cpp ++ (9.58E-02s)
2026-03-09 16:40:32.171 - amici.exporters.sundials.de_export - DEBUG - Finished writing dwdx.cpp ++ (7.81E-04s)
2026-03-09 16:40:32.398 - amici.exporters.sundials.de_export - DEBUG - Finished writing create_splines.cpp++ (1.81E-04s)
2026-03-09 16:40:32.431 - amici._symbolic.de_model - DEBUG - Finished simplifying spline_values+++++ (4.75E-05s)
2026-03-09 16:40:32.431 - amici._symbolic.de_model - DEBUG - Finished computing spline_values ++++ (8.67E-03s)
2026-03-09 16:40:32.447 - amici._symbolic.de_model - DEBUG - Finished simplifying dspline_valuesdp++++ (4.56E-05s)
2026-03-09 16:40:32.447 - amici._symbolic.de_model - DEBUG - Finished computing dspline_valuesdp +++ (3.26E-02s)
2026-03-09 16:40:32.448 - amici.exporters.sundials.de_export - DEBUG - Finished writing dspline_valuesdp.cpp++ (4.06E-02s)
2026-03-09 16:40:32.479 - amici._symbolic.de_model - DEBUG - Finished simplifying spline_slopes+++++ (4.07E-05s)
2026-03-09 16:40:32.479 - amici._symbolic.de_model - DEBUG - Finished computing spline_slopes ++++ (8.46E-03s)
2026-03-09 16:40:32.495 - amici._symbolic.de_model - DEBUG - Finished simplifying dspline_slopesdp++++ (4.23E-05s)
2026-03-09 16:40:32.496 - amici._symbolic.de_model - DEBUG - Finished computing dspline_slopesdp +++ (3.16E-02s)
2026-03-09 16:40:32.497 - amici.exporters.sundials.de_export - DEBUG - Finished writing dspline_slopesdp.cpp++ (4.00E-02s)
2026-03-09 16:40:32.504 - amici.exporters.sundials.de_export - DEBUG - Finished writing dwdw.cpp ++ (6.10E-06s)
2026-03-09 16:40:32.535 - amici._symbolic.de_model - DEBUG - Finished simplifying xdot +++++ (5.55E-04s)
2026-03-09 16:40:32.535 - amici._symbolic.de_model - DEBUG - Finished computing xdot ++++ (9.17E-03s)
2026-03-09 16:40:32.554 - amici._symbolic.de_model - DEBUG - Finished simplifying dxdotdw ++++ (8.17E-05s)
2026-03-09 16:40:32.554 - amici._symbolic.de_model - DEBUG - Finished computing dxdotdw +++ (3.53E-02s)
2026-03-09 16:40:32.557 - amici.exporters.sundials.de_export - DEBUG - Finished writing dxdotdw.cpp++ (4.59E-02s)
2026-03-09 16:40:32.585 - amici._symbolic.de_model - DEBUG - Finished simplifying dxdotdx_explicit++++ (4.04E-05s)
2026-03-09 16:40:32.586 - amici._symbolic.de_model - DEBUG - Finished computing dxdotdx_explicit +++ (1.46E-02s)
2026-03-09 16:40:32.587 - amici.exporters.sundials.de_export - DEBUG - Finished writing dxdotdx_explicit.cpp++ (2.17E-02s)
2026-03-09 16:40:32.615 - amici._symbolic.de_model - DEBUG - Finished simplifying dxdotdp_explicit++++ (4.12E-05s)
2026-03-09 16:40:32.616 - amici._symbolic.de_model - DEBUG - Finished computing dxdotdp_explicit +++ (1.54E-02s)
2026-03-09 16:40:32.616 - amici.exporters.sundials.de_export - DEBUG - Finished writing dxdotdp_explicit.cpp++ (2.23E-02s)
2026-03-09 16:40:32.654 - amici._symbolic.de_model - DEBUG - Finished simplifying dydx +++++ (6.19E-05s)
2026-03-09 16:40:32.655 - amici._symbolic.de_model - DEBUG - Finished computing dydx ++++ (1.68E-02s)
2026-03-09 16:40:32.679 - amici._symbolic.de_model - DEBUG - Finished simplifying dydw +++++ (3.79E-05s)
2026-03-09 16:40:32.679 - amici._symbolic.de_model - DEBUG - Finished computing dydw ++++ (1.61E-02s)
2026-03-09 16:40:32.689 - amici._symbolic.de_model - DEBUG - Finished simplifying dydx ++++ (7.31E-05s)
2026-03-09 16:40:32.689 - amici._symbolic.de_model - DEBUG - Finished computing dydx +++ (5.93E-02s)
2026-03-09 16:40:32.690 - amici.exporters.sundials.de_export - DEBUG - Finished writing dydx.cpp ++ (6.66E-02s)
2026-03-09 16:40:32.728 - amici._symbolic.de_model - DEBUG - Finished simplifying dydp +++++ (4.07E-05s)
2026-03-09 16:40:32.729 - amici._symbolic.de_model - DEBUG - Finished computing dydp ++++ (1.61E-02s)
2026-03-09 16:40:32.738 - amici._symbolic.de_model - DEBUG - Finished simplifying dydp ++++ (5.74E-05s)
2026-03-09 16:40:32.738 - amici._symbolic.de_model - DEBUG - Finished computing dydp +++ (3.34E-02s)
2026-03-09 16:40:32.739 - amici.exporters.sundials.de_export - DEBUG - Finished writing dydp.cpp ++ (4.10E-02s)
2026-03-09 16:40:32.799 - amici._symbolic.de_model - DEBUG - Finished simplifying drootdt +++++++ (4.31E-05s)
2026-03-09 16:40:32.800 - amici._symbolic.de_model - DEBUG - Finished computing drootdt ++++++ (1.70E-02s)
2026-03-09 16:40:32.833 - amici._symbolic.de_model - DEBUG - Finished simplifying drootdw +++++++ (4.02E-05s)
2026-03-09 16:40:32.834 - amici._symbolic.de_model - DEBUG - Finished computing drootdw ++++++ (1.76E-02s)
2026-03-09 16:40:32.843 - amici._symbolic.de_model - DEBUG - Finished simplifying drootdt_total++++++ (4.33E-05s)
2026-03-09 16:40:32.844 - amici._symbolic.de_model - DEBUG - Finished computing drootdt_total +++++ (6.83E-02s)
2026-03-09 16:40:32.844 - amici._symbolic.de_model - DEBUG - Finished computing dtaudx ++++ (8.28E-02s)
2026-03-09 16:40:32.845 - amici._symbolic.de_model - DEBUG - Finished computing dzdx +++ (9.13E-02s)
2026-03-09 16:40:32.846 - amici.exporters.sundials.de_export - DEBUG - Finished writing dzdx.cpp ++ (9.83E-02s)
2026-03-09 16:40:32.863 - amici._symbolic.de_model - DEBUG - Finished computing dzdp +++ (7.03E-05s)
2026-03-09 16:40:32.863 - amici.exporters.sundials.de_export - DEBUG - Finished writing dzdp.cpp ++ (7.92E-03s)
2026-03-09 16:40:32.877 - amici._symbolic.de_model - DEBUG - Finished computing drzdx +++ (7.24E-05s)
2026-03-09 16:40:32.877 - amici.exporters.sundials.de_export - DEBUG - Finished writing drzdx.cpp ++ (6.67E-03s)
2026-03-09 16:40:32.892 - amici._symbolic.de_model - DEBUG - Finished computing drzdp +++ (6.17E-05s)
2026-03-09 16:40:32.892 - amici.exporters.sundials.de_export - DEBUG - Finished writing drzdp.cpp ++ (6.59E-03s)
2026-03-09 16:40:32.920 - amici._symbolic.de_model - DEBUG - Finished simplifying dsigmaydy ++++ (4.07E-05s)
2026-03-09 16:40:32.921 - amici._symbolic.de_model - DEBUG - Finished computing dsigmaydy +++ (1.46E-02s)
2026-03-09 16:40:32.922 - amici.exporters.sundials.de_export - DEBUG - Finished writing dsigmaydy.cpp++ (2.17E-02s)
2026-03-09 16:40:32.952 - amici._symbolic.de_model - DEBUG - Finished simplifying dsigmaydp ++++ (5.86E-05s)
2026-03-09 16:40:32.952 - amici._symbolic.de_model - DEBUG - Finished computing dsigmaydp +++ (1.52E-02s)
2026-03-09 16:40:32.954 - amici.exporters.sundials.de_export - DEBUG - Finished writing dsigmaydp.cpp++ (2.36E-02s)
2026-03-09 16:40:32.962 - amici.exporters.sundials.de_export - DEBUG - Finished writing sigmay.cpp++ (2.46E-04s)
2026-03-09 16:40:32.991 - amici._symbolic.de_model - DEBUG - Finished simplifying sigmaz +++++ (6.00E-05s)
2026-03-09 16:40:32.992 - amici._symbolic.de_model - DEBUG - Finished computing sigmaz ++++ (8.81E-03s)
2026-03-09 16:40:33.009 - amici._symbolic.de_model - DEBUG - Finished simplifying dsigmazdp ++++ (4.32E-05s)
2026-03-09 16:40:33.009 - amici._symbolic.de_model - DEBUG - Finished computing dsigmazdp +++ (3.37E-02s)
2026-03-09 16:40:33.010 - amici.exporters.sundials.de_export - DEBUG - Finished writing dsigmazdp.cpp++ (4.04E-02s)
2026-03-09 16:40:33.018 - amici.exporters.sundials.de_export - DEBUG - Finished writing sigmaz.cpp++ (6.10E-06s)
2026-03-09 16:40:33.032 - amici._symbolic.de_model - DEBUG - Finished computing stau +++ (8.55E-05s)
2026-03-09 16:40:33.032 - amici.exporters.sundials.de_export - DEBUG - Finished writing stau.cpp ++ (6.66E-03s)
2026-03-09 16:40:33.047 - amici._symbolic.de_model - DEBUG - Finished computing deltax +++ (6.56E-05s)
2026-03-09 16:40:33.047 - amici.exporters.sundials.de_export - DEBUG - Finished writing deltax.cpp++ (6.82E-03s)
2026-03-09 16:40:33.062 - amici._symbolic.de_model - DEBUG - Finished computing deltasx +++ (7.19E-05s)
2026-03-09 16:40:33.063 - amici.exporters.sundials.de_export - DEBUG - Finished writing deltasx.cpp++ (6.73E-03s)
2026-03-09 16:40:33.076 - amici._symbolic.de_model - DEBUG - Finished computing deltaxB +++ (6.51E-05s)
2026-03-09 16:40:33.077 - amici.exporters.sundials.de_export - DEBUG - Finished writing deltaxB.cpp++ (6.58E-03s)
2026-03-09 16:40:33.091 - amici._symbolic.de_model - DEBUG - Finished computing deltaqB +++ (6.03E-05s)
2026-03-09 16:40:33.092 - amici.exporters.sundials.de_export - DEBUG - Finished writing deltaqB.cpp++ (6.59E-03s)
2026-03-09 16:40:33.101 - amici.exporters.sundials.de_export - DEBUG - Finished writing w.cpp ++ (7.79E-04s)
2026-03-09 16:40:33.124 - amici._symbolic.de_model - DEBUG - Finished simplifying x0 ++++ (7.94E-05s)
2026-03-09 16:40:33.124 - amici._symbolic.de_model - DEBUG - Finished computing x0 +++ (8.60E-03s)
2026-03-09 16:40:33.126 - amici.exporters.sundials.de_export - DEBUG - Finished writing x0.cpp ++ (1.68E-02s)
2026-03-09 16:40:33.147 - amici._symbolic.de_model - DEBUG - Finished simplifying x0_fixedParameters++++ (3.91E-05s)
2026-03-09 16:40:33.147 - amici._symbolic.de_model - DEBUG - Finished computing x0_fixedParameters+++ (7.99E-03s)
2026-03-09 16:40:33.148 - amici.exporters.sundials.de_export - DEBUG - Finished writing x0_fixedParameters.cpp++ (1.46E-02s)
2026-03-09 16:40:33.176 - amici._symbolic.de_model - DEBUG - Finished simplifying sx0 ++++ (4.04E-05s)
2026-03-09 16:40:33.177 - amici._symbolic.de_model - DEBUG - Finished computing sx0 +++ (1.42E-02s)
2026-03-09 16:40:33.178 - amici.exporters.sundials.de_export - DEBUG - Finished writing sx0.cpp ++ (2.25E-02s)
2026-03-09 16:40:33.213 - amici._symbolic.de_model - DEBUG - Finished simplifying sx0_fixedParameters++++ (8.99E-05s)
2026-03-09 16:40:33.214 - amici._symbolic.de_model - DEBUG - Finished computing sx0_fixedParameters+++ (2.14E-02s)
2026-03-09 16:40:33.215 - amici.exporters.sundials.de_export - DEBUG - Finished writing sx0_fixedParameters.cpp++ (2.86E-02s)
2026-03-09 16:40:33.224 - amici.exporters.sundials.de_export - DEBUG - Finished writing xdot.cpp ++ (1.28E-03s)
2026-03-09 16:40:33.232 - amici.exporters.sundials.de_export - DEBUG - Finished writing y.cpp ++ (2.53E-04s)
2026-03-09 16:40:33.254 - amici._symbolic.de_model - DEBUG - Finished simplifying x_rdata ++++ (6.43E-05s)
2026-03-09 16:40:33.254 - amici._symbolic.de_model - DEBUG - Finished computing x_rdata +++ (8.28E-03s)
2026-03-09 16:40:33.255 - amici.exporters.sundials.de_export - DEBUG - Finished writing x_rdata.cpp++ (1.53E-02s)
2026-03-09 16:40:33.278 - amici._symbolic.de_model - DEBUG - Finished simplifying total_cl ++++ (4.33E-05s)
2026-03-09 16:40:33.279 - amici._symbolic.de_model - DEBUG - Finished computing total_cl +++ (7.64E-03s)
2026-03-09 16:40:33.280 - amici.exporters.sundials.de_export - DEBUG - Finished writing total_cl.cpp++ (1.56E-02s)
2026-03-09 16:40:33.310 - amici._symbolic.de_model - DEBUG - Finished simplifying dtotal_cldp ++++ (4.36E-05s)
2026-03-09 16:40:33.311 - amici._symbolic.de_model - DEBUG - Finished computing dtotal_cldp +++ (1.64E-02s)
2026-03-09 16:40:33.312 - amici.exporters.sundials.de_export - DEBUG - Finished writing dtotal_cldp.cpp++ (2.43E-02s)
2026-03-09 16:40:33.335 - amici._symbolic.de_model - DEBUG - Finished simplifying dtotal_cldx_rdata++++ (3.91E-05s)
2026-03-09 16:40:33.336 - amici._symbolic.de_model - DEBUG - Finished computing dtotal_cldx_rdata+++ (8.39E-03s)
2026-03-09 16:40:33.337 - amici.exporters.sundials.de_export - DEBUG - Finished writing dtotal_cldx_rdata.cpp++ (1.82E-02s)
2026-03-09 16:40:33.359 - amici._symbolic.de_model - DEBUG - Finished simplifying x_solver ++++ (6.56E-05s)
2026-03-09 16:40:33.360 - amici._symbolic.de_model - DEBUG - Finished computing x_solver +++ (8.57E-03s)
2026-03-09 16:40:33.361 - amici.exporters.sundials.de_export - DEBUG - Finished writing x_solver.cpp++ (1.60E-02s)
2026-03-09 16:40:33.384 - amici._symbolic.de_model - DEBUG - Finished simplifying dx_rdatadx_solver++++ (4.83E-05s)
2026-03-09 16:40:33.384 - amici._symbolic.de_model - DEBUG - Finished computing dx_rdatadx_solver+++ (8.25E-03s)
2026-03-09 16:40:33.386 - amici.exporters.sundials.de_export - DEBUG - Finished writing dx_rdatadx_solver.cpp++ (1.63E-02s)
2026-03-09 16:40:33.407 - amici._symbolic.de_model - DEBUG - Finished simplifying dx_rdatadp ++++ (4.58E-05s)
2026-03-09 16:40:33.408 - amici._symbolic.de_model - DEBUG - Finished computing dx_rdatadp +++ (7.99E-03s)
2026-03-09 16:40:33.409 - amici.exporters.sundials.de_export - DEBUG - Finished writing dx_rdatadp.cpp++ (1.55E-02s)
2026-03-09 16:40:33.439 - amici._symbolic.de_model - DEBUG - Finished simplifying dx_rdatadtcl ++++ (4.04E-05s)
2026-03-09 16:40:33.439 - amici._symbolic.de_model - DEBUG - Finished computing dx_rdatadtcl +++ (1.50E-02s)
2026-03-09 16:40:33.440 - amici.exporters.sundials.de_export - DEBUG - Finished writing dx_rdatadtcl.cpp++ (2.32E-02s)
2026-03-09 16:40:33.454 - amici._symbolic.de_model - DEBUG - Finished computing z +++ (6.54E-05s)
2026-03-09 16:40:33.455 - amici.exporters.sundials.de_export - DEBUG - Finished writing z.cpp ++ (6.61E-03s)
2026-03-09 16:40:33.469 - amici._symbolic.de_model - DEBUG - Finished computing rz +++ (5.98E-05s)
2026-03-09 16:40:33.469 - amici.exporters.sundials.de_export - DEBUG - Finished writing rz.cpp ++ (6.59E-03s)
2026-03-09 16:40:33.477 - amici.exporters.sundials.de_export - DEBUG - Finished writing explicit_roots.cpp++ (4.89E-05s)
2026-03-09 16:40:33.484 - amici.exporters.sundials.de_export - DEBUG - Finished generating cpp code+ (1.77E+00s)
2026-03-09 16:40:45.746 - amici.exporters.sundials.de_export - DEBUG - Finished compiling cpp code + (1.23E+01s)
2026-03-09 16:40:45.754 - amici.importers.petab.v1._sbml_import - INFO - Finished Importing PEtab model (1.42E+01s)
running build_ext
------------------------------ model_ext ------------------------------
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CURRENT_SOURCE_DIR: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear
-- CMAKE_BINARY_DIR: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext
-- CMAKE_INSTALL_PREFIX: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/caroModel_linear
-- CMAKE_VERSION: 4.2.3
-- CMAKE_COMMAND: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/cmake/data/bin/cmake
-- Performing Test CUR_FLAG_SUPPORTED
-- Performing Test CUR_FLAG_SUPPORTED - Success
-- Performing Test CUR_FLAG_SUPPORTED
-- Performing Test CUR_FLAG_SUPPORTED - Success
-- Performing Test CUR_FLAG_SUPPORTED
-- Performing Test CUR_FLAG_SUPPORTED - Success
-- Performing Test CUR_FLAG_SUPPORTED
-- Performing Test CUR_FLAG_SUPPORTED - Success
-- Trying to find OpenBLAS in CONFIG mode (scipy-openblas64)
-- Found OpenBLAS in CONFIG mode (OpenBLAS_DIR=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/cmake/openblas)
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5") found components: CXX
-- SuiteSparse_config version: 7.8.2
-- SuiteSparse_config include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/suitesparse
-- SuiteSparse_config library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsuitesparseconfig.a
-- SuiteSparse_config static: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsuitesparseconfig.a
-- BTF version: 2.3.2
-- BTF include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/suitesparse
-- BTF library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libbtf.a
-- BTF static: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libbtf.a
-- AMD version: 3.3.3
-- AMD include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/suitesparse
-- AMD library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libamd.a
-- AMD static: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libamd.a
-- COLAMD version: 3.3.4
-- COLAMD include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/suitesparse
-- COLAMD library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libcolamd.a
-- COLAMD static: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libcolamd.a
-- KLU version: 2.3.4
-- KLU include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/suitesparse
-- KLU library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libklu.a
-- KLU static: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libklu.a
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libcurl.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libcurl.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.10") found components: C HL CXX
-- Found AMICI /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/cmake/Amici
CMake Warning at CMakeLists.txt:117 (find_package):
By not providing "FindBoost.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Boost", but
CMake did not find one.
Could not find a package configuration file provided by "Boost" with any of
the following names:
BoostConfig.cmake
boost-config.cmake
Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
"Boost_DIR" to a directory containing one of the above files. If "Boost"
provides a separate development package or SDK, be sure it has been
installed.
-- Found SWIG: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/bin/swig4.0 (found version "4.4.1")
-- Found Python3: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/bin/python (found version "3.11.12") found components: Interpreter Development Development.Module Development.Embed
-- Python extension suffix is .cpython-311-x86_64-linux-gnu.so
-- Configuring done (1.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext
Change Dir: '/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext'
Run Build Command(s): /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/bin/ninja -v
[1/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/caroModel_linear.cpp.o -MF CMakeFiles/caroModel_linear.dir/caroModel_linear.cpp.o.d -o CMakeFiles/caroModel_linear.dir/caroModel_linear.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/caroModel_linear.cpp
[2/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/Jy.cpp.o -MF CMakeFiles/caroModel_linear.dir/Jy.cpp.o.d -o CMakeFiles/caroModel_linear.dir/Jy.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/Jy.cpp
[3/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/dJydsigma.cpp.o -MF CMakeFiles/caroModel_linear.dir/dJydsigma.cpp.o.d -o CMakeFiles/caroModel_linear.dir/dJydsigma.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dJydsigma.cpp
[4/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/create_splines.cpp.o -MF CMakeFiles/caroModel_linear.dir/create_splines.cpp.o.d -o CMakeFiles/caroModel_linear.dir/create_splines.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/create_splines.cpp
[5/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/dsigmaydp.cpp.o -MF CMakeFiles/caroModel_linear.dir/dsigmaydp.cpp.o.d -o CMakeFiles/caroModel_linear.dir/dsigmaydp.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dsigmaydp.cpp
[6/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/dJydy.cpp.o -MF CMakeFiles/caroModel_linear.dir/dJydy.cpp.o.d -o CMakeFiles/caroModel_linear.dir/dJydy.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dJydy.cpp
In file included from /usr/include/c++/13/bits/stl_uninitialized.h:63,
from /usr/include/c++/13/memory:69,
from /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/gsl/gsl-lite.hpp:24,
from /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/amici/sundials_matrix_wrapper.h:8,
from /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dJydy.cpp:1:
In static member function ‘static constexpr _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = const long int; _Up = long int; bool _IsMove = false]’,
inlined from ‘constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const long int*; _OI = long int*]’ at /usr/include/c++/13/bits/stl_algobase.h:506:30,
inlined from ‘constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const long int*; _OI = long int*]’ at /usr/include/c++/13/bits/stl_algobase.h:533:42,
inlined from ‘constexpr _OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const long int*; _OI = long int*]’ at /usr/include/c++/13/bits/stl_algobase.h:540:31,
inlined from ‘constexpr _OI std::copy(_II, _II, _OI) [with _II = const long int*; _OI = long int*]’ at /usr/include/c++/13/bits/stl_algobase.h:633:7,
inlined from ‘constexpr _OutputIterator std::__copy_n(_RandomAccessIterator, _Size, _OutputIterator, random_access_iterator_tag) [with _RandomAccessIterator = const long int*; _Size = long int; _OutputIterator = long int*]’ at /usr/include/c++/13/bits/stl_algo.h:731:23,
inlined from ‘constexpr _OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const long int*; _Size = long int; _OIter = long int*]’ at /usr/include/c++/13/bits/stl_algo.h:763:27,
inlined from ‘void amici::SUNMatrixWrapper::set_indexvals(gsl::span<const long int>)’ at /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/amici/sundials_matrix_wrapper.h:314:20,
inlined from ‘void amici::model_caroModel_linear::dJydy_rowvals_caroModel_linear(amici::SUNMatrixWrapper&, int)’ at /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dJydy.cpp:34:24:
/usr/include/c++/13/bits/stl_algobase.h:437:30: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ reading between 9 and 9223372036854775807 bytes from a region of size 8 [-Wstringop-overread]
437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dJydy.cpp: In function ‘void amici::model_caroModel_linear::dJydy_rowvals_caroModel_linear(amici::SUNMatrixWrapper&, int)’:
/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dJydy.cpp:29:61: note: source object ‘amici::model_caroModel_linear::dJydy_rowvals_caroModel_linear_’ of size 8
29 | static constexpr std::array<std::array<sunindextype, 1>, 1> dJydy_rowvals_caroModel_linear_ = {{
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[7/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/dwdp.cpp.o -MF CMakeFiles/caroModel_linear.dir/dwdp.cpp.o.d -o CMakeFiles/caroModel_linear.dir/dwdp.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dwdp.cpp
[8/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/dwdx.cpp.o -MF CMakeFiles/caroModel_linear.dir/dwdx.cpp.o.d -o CMakeFiles/caroModel_linear.dir/dwdx.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dwdx.cpp
[9/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/dxdotdw.cpp.o -MF CMakeFiles/caroModel_linear.dir/dxdotdw.cpp.o.d -o CMakeFiles/caroModel_linear.dir/dxdotdw.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dxdotdw.cpp
[10/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/sigmay.cpp.o -MF CMakeFiles/caroModel_linear.dir/sigmay.cpp.o.d -o CMakeFiles/caroModel_linear.dir/sigmay.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/sigmay.cpp
[11/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/dydx.cpp.o -MF CMakeFiles/caroModel_linear.dir/dydx.cpp.o.d -o CMakeFiles/caroModel_linear.dir/dydx.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/dydx.cpp
[12/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/w.cpp.o -MF CMakeFiles/caroModel_linear.dir/w.cpp.o.d -o CMakeFiles/caroModel_linear.dir/w.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/w.cpp
[13/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/x_rdata.cpp.o -MF CMakeFiles/caroModel_linear.dir/x_rdata.cpp.o.d -o CMakeFiles/caroModel_linear.dir/x_rdata.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/x_rdata.cpp
[14/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/x_solver.cpp.o -MF CMakeFiles/caroModel_linear.dir/x_solver.cpp.o.d -o CMakeFiles/caroModel_linear.dir/x_solver.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/x_solver.cpp
[15/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/xdot.cpp.o -MF CMakeFiles/caroModel_linear.dir/xdot.cpp.o.d -o CMakeFiles/caroModel_linear.dir/xdot.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/xdot.cpp
[16/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/y.cpp.o -MF CMakeFiles/caroModel_linear.dir/y.cpp.o.d -o CMakeFiles/caroModel_linear.dir/y.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/y.cpp
[17/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT CMakeFiles/caroModel_linear.dir/wrapfunctions.cpp.o -MF CMakeFiles/caroModel_linear.dir/wrapfunctions.cpp.o.d -o CMakeFiles/caroModel_linear.dir/wrapfunctions.cpp.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/wrapfunctions.cpp
[18/21] : && /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/cmake/data/bin/cmake -E rm -f libcaroModel_linear.a && /usr/bin/ar qc libcaroModel_linear.a CMakeFiles/caroModel_linear.dir/Jy.cpp.o CMakeFiles/caroModel_linear.dir/caroModel_linear.cpp.o CMakeFiles/caroModel_linear.dir/create_splines.cpp.o CMakeFiles/caroModel_linear.dir/dJydsigma.cpp.o CMakeFiles/caroModel_linear.dir/dJydy.cpp.o CMakeFiles/caroModel_linear.dir/dsigmaydp.cpp.o CMakeFiles/caroModel_linear.dir/dwdp.cpp.o CMakeFiles/caroModel_linear.dir/dwdx.cpp.o CMakeFiles/caroModel_linear.dir/dxdotdw.cpp.o CMakeFiles/caroModel_linear.dir/dydx.cpp.o CMakeFiles/caroModel_linear.dir/sigmay.cpp.o CMakeFiles/caroModel_linear.dir/w.cpp.o CMakeFiles/caroModel_linear.dir/wrapfunctions.cpp.o CMakeFiles/caroModel_linear.dir/x_rdata.cpp.o CMakeFiles/caroModel_linear.dir/x_solver.cpp.o CMakeFiles/caroModel_linear.dir/xdot.cpp.o CMakeFiles/caroModel_linear.dir/y.cpp.o && /usr/bin/ranlib libcaroModel_linear.a && :
[19/21] cd /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext/swig && /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/cmake/data/bin/cmake -E make_directory /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext/swig/CMakeFiles/_caroModel_linear.dir /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext/swig /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext/swig/CMakeFiles/_caroModel_linear.dir && /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/cmake/data/bin/cmake -E env SWIG_LIB=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/swig/data/share/swig/4.4.1 /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/bin/swig4.0 -python -I/home/docs/.asdf/installs/python/3.11.12/include/python3.11 -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/swig/.. -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/../swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -I/usr/include/hdf5/serial -outdir /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext/swig -c++ -interface _caroModel_linear -I/home/docs/.asdf/installs/python/3.11.12/include/python3.11 -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/swig/.. -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/../swig -o /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext/swig/CMakeFiles/_caroModel_linear.dir/caroModel_linearPYTHON_wrap.cxx /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/swig/caroModel_linear.i
[20/21] /usr/bin/c++ -DHDF_NO_NAMESPACE -DNO_STATIC_CAST -DOLD_HEADER_FILENAME -DSUNDIALS_STATIC_DEFINE -D_caroModel_linear_EXPORTS -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/swig/.. -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include/../swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -isystem /home/docs/.asdf/installs/python/3.11.12/include/python3.11 -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++20 -fPIC -fopenmp -MD -MT swig/CMakeFiles/_caroModel_linear.dir/CMakeFiles/_caroModel_linear.dir/caroModel_linearPYTHON_wrap.cxx.o -MF swig/CMakeFiles/_caroModel_linear.dir/CMakeFiles/_caroModel_linear.dir/caroModel_linearPYTHON_wrap.cxx.o.d -o swig/CMakeFiles/_caroModel_linear.dir/CMakeFiles/_caroModel_linear.dir/caroModel_linearPYTHON_wrap.cxx.o -c /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext/swig/CMakeFiles/_caroModel_linear.dir/caroModel_linearPYTHON_wrap.cxx
[21/21] : && /usr/bin/c++ -fPIC -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -shared -Wl,--dependency-file=swig/CMakeFiles/_caroModel_linear.dir/link.d -o swig/_caroModel_linear.cpython-311-x86_64-linux-gnu.so swig/CMakeFiles/_caroModel_linear.dir/CMakeFiles/_caroModel_linear.dir/caroModel_linearPYTHON_wrap.cxx.o -Wl,-rpath,/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial libcaroModel_linear.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libamici.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_nvecserial.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsolspbcgs.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsolspfgmr.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsolspgmr.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsolsptfqmr.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_cvodes.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_idas.a /usr/lib/gcc/x86_64-linux-gnu/13/libgomp.so /usr/lib/x86_64-linux-gnu/libpthread.a -ldl /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libscipy_openblas64_.so /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunnonlinsolnewton.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunnonlinsolfixedpoint.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsolklu.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunmatrixsparse.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libklu.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libamd.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libcolamd.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsuitesparseconfig.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libbtf.a -lm /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsolband.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunmatrixband.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsoldense.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunmatrixdense.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_sunlinsolpcg.a /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation/lib/libsundials_core.a -lm /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl_cpp.so /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so && :
-- Installing: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/caroModel_linear/./caroModel_linear.py
-- Installing: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/caroModel_linear/./_caroModel_linear.cpython-311-x86_64-linux-gnu.so
-- Installing: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/caroModel_linear/lib/libcaroModel_linear.a
------------------------------ model_ext ------------------------------
running AmiciBuildCMakeExtension
==> Configuring:
$ cmake -S /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear -B /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext -G Ninja -DCMAKE_MAKE_PROGRAM=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/bin/ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/caroModel_linear -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_PREFIX_PATH='/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation;/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/lib/python3.11/site-packages/amici/_installation' -DAMICI_PYTHON_BUILD_EXT_ONLY=ON -DPython3_EXECUTABLE=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/1652/bin/python
==> Building:
$ cmake --build /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext --config Release
==> Installing:
$ cmake --install /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/1652/doc/example/amici_models/1.0.0/caroModel_linear/build_model_ext --config Release
model_subspa | M1_0:M1_0-00 | AIC | None | 3.698e+01 | None | True
To search more of the model space, hence models with more parameters, the algorithm can be repeated. As models with no estimated parameters have already been tested, subsequent select calls will begin with the next simplest model (in this case, models with exactly 1 estimated parameter, if they exist in the model space), and move on to more complex models.
The best model from the first iteration is supplied as the predecessor (initial) model here.
[6]:
best_model_2, _ = pypesto_select_problem_1.select(
method=Method.FORWARD,
criterion=Criterion.AIC,
model_problem_options=model_problem_options,
predecessor_model=best_model_1,
)
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
M1_0:M1_0-00 | M1_1:M1_1-00 | AIC | 3.698e+01 | -4.175e+00 | -4.115e+01 | True
Visualization table not available. Skipping.
M1_0:M1_0-00 | M1_2:M1_2-00 | AIC | 3.698e+01 | -4.275e+00 | -4.125e+01 | True
Visualization table not available. Skipping.
M1_0:M1_0-00 | M1_3:M1_3-00 | AIC | 3.698e+01 | -4.705e+00 | -4.168e+01 | True
Plotting routines to visualize the best model at each iteration of the selection process, or to visualize the graph of models that have been visited in the model space are available.
[7]:
import petab_select.plot as plot
selected_models = [best_model_1, best_model_2]
plot_data = plot.PlotData(
models=petab_select_problem.state.models,
criterion=Criterion.AIC,
relative_criterion=False,
)
plot.line_best_by_iteration(plot_data=plot_data)
plot_data.relative_criterion = True
plot.line_best_by_iteration(plot_data=plot_data);
[8]:
plot_data = plot.PlotData(
models=petab_select_problem.state.models,
criterion=Criterion.AIC,
)
plot_data.augment_labels(criterion=True)
plot.graph_history(plot_data=plot_data);
Backward Selection, Custom Initial Model
Backward selection is specified by changing the algorithm from Method.FORWARD to Method.BACKWARD in the select() call.
A custom initial model is specified with the optional predecessor_model argument of select().
[9]:
import numpy as np
from petab_select import Model
# The PEtab Select problem contains information about calibrated models,
# so that they are not recalibrated. In order to do a completely new
# model selection, one can reload the original PEtab Select problem.
petab_select_problem = petab_select.Problem.from_yaml(
"model_selection/petab_select_problem.yaml"
)
pypesto_select_problem_2 = pypesto.select.Problem(
petab_select_problem=petab_select_problem
)
model_subspace_petab_yaml = "model_selection/example_modelSelection.yaml"
initial_model = Model(
model_id="myModel",
model_subspace_petab_yaml=model_subspace_petab_yaml,
model_subspace_id="dummy_myModel",
model_subspace_indices=[0, 0, 0],
parameters={
"k1": 0.1,
"k2": ESTIMATE,
"k3": ESTIMATE,
},
criteria={petab_select_problem.criterion: np.inf},
)
print("Initial model:")
print(initial_model)
Initial model:
model_id model_subspace_petab_yaml k1 k2 k3
myModel model_selection/example_modelSelection.yaml 0.1 estimate estimate
[10]:
pypesto_select_problem_2.select(
method=Method.BACKWARD,
criterion=Criterion.AIC,
predecessor_model=initial_model,
model_problem_options=model_problem_options,
);
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
dummy_myMode | M1_1:M1_1-00 | AIC | inf | 3.897e+01 | -inf | True
Visualization table not available. Skipping.
dummy_myMode | M1_2:M1_2-00 | AIC | inf | 2.411e+01 | -inf | True
[11]:
plot_data = plot.PlotData(
models=petab_select_problem.state.models,
criterion=Criterion.AIC,
)
plot_data.augment_labels(criterion=True)
plot.graph_history(plot_data=plot_data);
Additional Options
There exist additional options that can be used to further customise selection algorithms.
Select First Improvement
At each selection step, as soon as a model that improves on the previous model is encountered (by the specified criterion), it is selected and immediately used as the previous model in the next iteration of the selection. This is unlike the default behaviour, where all test models at each iteration are optimized, and the best of these is selected.
Use Previous Maximum Likelihood Estimate as Startpoint
The maximum likelihood estimate from the previous model is used as one of the startpoints in the multistart optimization of the test models. The default behaviour is that all startpoints are automatically generated by pyPESTO.
Minimize Options
Optimization can be customised with a dictionary that specifies values for the corresponding keyword arguments of minimize.
Criterion Options
Currently implemented options are: Criterion.AIC (Akaike information criterion), Criterion.AICC (corrected AIC), and Criterion.BIC (Bayesian information criterion).
Criterion Threshold
A threshold can be specified, such that only models that improve on previous models by the threshold amount in the chosen criterion are accepted.
[12]:
petab_select_problem = petab_select.Problem.from_yaml(
"model_selection/petab_select_problem.yaml"
)
pypesto_select_problem_3 = pypesto.select.Problem(
petab_select_problem=petab_select_problem
)
best_models = pypesto_select_problem_3.select_to_completion(
method=Method.FORWARD,
criterion=Criterion.BIC,
select_first_improvement=True,
startpoint_latest_mle=True,
model_problem_options=model_problem_options,
)
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
model_subspa | M1_0:M1_0-00 | BIC | None | 3.677e+01 | None | True
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
M1_0:M1_0-00 | M1_1:M1_1-00 | BIC | 3.677e+01 | -4.592e+00 | -4.136e+01 | True
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
M1_1:M1_1-00 | M1_4:M1_4-00 | BIC | -4.592e+00 | -2.899e+00 | 1.693e+00 | False
Visualization table not available. Skipping.
M1_1:M1_1-00 | M1_5:M1_5-00 | BIC | -4.592e+00 | -3.330e+00 | 1.262e+00 | False
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
M1_1:M1_1-00 | M1_7:M1_7-00 | BIC | -4.592e+00 | -4.889e+00 | -2.975e-01 | True
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
[13]:
plot_data = plot.PlotData(
petab_select_problem.state.models,
criterion=Criterion.BIC,
)
plot.line_best_by_iteration(plot_data=plot_data);
[14]:
plot_data.relative_criterion = False
plot_data.augment_labels(criterion=True)
plot.graph_history(plot_data=plot_data);
Postprocessors
You can optionally provide postprocessing methods that operate on calibrated models. For example, there are postprocessors to save the pyPESTO result to disk, or save a summarized report of models to a TSV file. You can also write your own method, which should take only a single pypesto.select.ModelProblem object as input.
[15]:
# Repeat with AICc and criterion_threshold == 10
petab_select_problem = petab_select.Problem.from_yaml(
"model_selection/petab_select_problem.yaml"
)
pypesto_select_problem_4 = pypesto.select.Problem(
petab_select_problem=petab_select_problem
)
[16]:
# Setup a postprocessor that saves the pyPESTO result objects to disk, as well as a summarized report.
import shutil
from functools import partial
from pathlib import Path
from pypesto.select.postprocessors import (
multi_postprocessor,
report_postprocessor,
save_postprocessor,
)
output_path = Path() / "output_select"
if output_path.exists():
shutil.rmtree(str(output_path))
output_path.mkdir(exist_ok=True, parents=True)
model_postprocessor = partial(
multi_postprocessor,
postprocessors=[
partial(save_postprocessor, output_path=output_path),
partial(
report_postprocessor, output_filepath=output_path / "report.tsv"
),
],
)
best_models = pypesto_select_problem_4.select_to_completion(
method=Method.FORWARD,
criterion=Criterion.AICC,
select_first_improvement=True,
startpoint_latest_mle=True,
model_problem_options=model_problem_options,
criterion_threshold=10,
model_postprocessor=model_postprocessor,
)
Specifying `postprocessor` as an individual argument is deprecated. Please instead specify it within some `model_problem_options` dictionary, e.g. `model_problem_options={"postprocessor": ...}`.
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
Warning: There is no sampling_result, which you tried to save to hdf5.
model_subspa | M1_0:M1_0-00 | AICc | None | 3.798e+01 | None | True
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
Warning: There is no sampling_result, which you tried to save to hdf5.
M1_0:M1_0-00 | M1_1:M1_1-00 | AICc | 3.798e+01 | -1.754e-01 | -3.815e+01 | True
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
Warning: There is no sampling_result, which you tried to save to hdf5.
M1_1:M1_1-00 | M1_4:M1_4-00 | AICc | -1.754e-01 | 9.725e+00 | 9.901e+00 | False
Visualization table not available. Skipping.
Warning: There is no sampling_result, which you tried to save to hdf5.
M1_1:M1_1-00 | M1_5:M1_5-00 | AICc | -1.754e-01 | 9.295e+00 | 9.470e+00 | False
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
Warning: There is no sampling_result, which you tried to save to hdf5.
M1_1:M1_1-00 | M1_7:M1_7-00 | AICc | -1.754e-01 | 3.594e+01 | 3.612e+01 | False
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
[17]:
df = pd.read_csv(output_path / "report.tsv", sep="\t")
df
[17]:
| model_id | total_time | NLLH | AIC | AICc | BIC | n_converged | start_time_0 | start_time_1 | start_time_2 | start_time_3 | start_time_4 | start_time_5 | start_time_6 | start_time_7 | start_time_8 | start_time_9 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | M1_0-000 | 0.356208 | 17.487615 | 36.975230 | 37.975230 | 36.766990 | 10 | 0.033051 | 0.036366 | 0.035012 | 0.042375 | 0.033721 | 0.036078 | 0.035537 | 0.038028 | 0.032853 | 0.033188 |
| 1 | M1_1-000 | 1.063245 | -4.087703 | -4.175406 | -0.175406 | -4.591887 | 1 | 0.034217 | 0.125923 | 0.115620 | 0.128945 | 0.059735 | 0.143925 | 0.125036 | 0.131442 | 0.089696 | 0.108706 |
| 2 | M1_4-000 | 3.608371 | -4.137257 | -2.274514 | 9.725486 | -2.899235 | 3 | 0.160088 | 0.558706 | 0.400491 | 0.352926 | 0.334573 | 0.334427 | 0.403541 | 0.307244 | 0.339314 | 0.417061 |
| 3 | M1_5-000 | 1.786584 | -4.352663 | -2.705327 | 9.294673 | -3.330048 | 1 | 0.154942 | 0.384223 | 0.161237 | 0.142861 | 0.164766 | 0.178489 | 0.169345 | 0.145764 | 0.180460 | 0.104498 |
| 4 | M1_7-000 | 3.710963 | -6.028235 | -4.056471 | 35.943529 | -4.889433 | 2 | 1.257710 | 0.493155 | 0.204775 | 0.275908 | 0.333207 | 0.263266 | 0.212745 | 0.208518 | 0.183091 | 0.278588 |
[18]:
plot_data = plot.PlotData(
models=petab_select_problem.state.models,
criterion=Criterion.AICC,
)
plot.line_best_by_iteration(plot_data=plot_data);
[19]:
plot_data.relative_criterion = False
plot_data.augment_labels(criterion=True)
plot.graph_history(plot_data=plot_data);
Saving results
Although pyPESTO results and summaries can be saved to disk via the postprocessors, most analysis methods will expect a petab_select.Models object, which is created during model selection and can also be saved to disk for later analysis.
[20]:
petab_select_problem.state.models.to_yaml(output_path / "my_models.yaml")
loaded_models = petab_select.Models.from_yaml(output_path / "my_models.yaml")
plot_data = plot.PlotData(
models=loaded_models, criterion=Criterion.AICC, relative_criterion=False
)
plot_data.augment_labels(criterion=True)
Additional plotting methods
There are additional plotting methods provided by the PEtab Select library, which are demonstrated in another notebook: https://petab-select.readthedocs.io/en/stable/examples/visualization.html
An example is this ordering of models according to the iteration in which they were calibrated. N.B. The predecessor of M1_7 is actually M1_1.
[21]:
plot.graph_iteration_layers(
plot_data=plot_data,
draw_networkx_kwargs={
"arrowstyle": "-|>",
"node_shape": "s",
"node_size": 4000,
"edgecolors": "k",
},
);
Multistart
Multiple model selections can be run by specifying multiple initial models.
[22]:
petab_select_problem = petab_select.Problem.from_yaml(
"model_selection/petab_select_problem.yaml"
)
pypesto_select_problem_5 = pypesto.select.Problem(
petab_select_problem=petab_select_problem
)
initial_model_1 = Model(
model_id="myModel1",
model_subspace_petab_yaml=model_subspace_petab_yaml,
model_subspace_id="dummy_myModel1",
model_subspace_indices=[0, 0, 0],
parameters={
"k1": 0,
"k2": 0,
"k3": 0,
},
criteria={petab_select_problem.criterion: np.inf},
)
initial_model_2 = Model(
model_id="myModel2",
model_subspace_petab_yaml=model_subspace_petab_yaml,
model_subspace_id="dummy_myModel2",
model_subspace_indices=[0, 0, 0],
parameters={
"k1": ESTIMATE,
"k2": ESTIMATE,
"k3": 0,
},
criteria={petab_select_problem.criterion: np.inf},
)
initial_models = [initial_model_1, initial_model_2]
best_model, best_models = pypesto_select_problem_5.multistart_select(
method=Method.FORWARD,
criterion=Criterion.AIC,
predecessor_models=initial_models,
model_problem_options=model_problem_options,
)
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
dummy_myMode | M1_1:M1_1-00 | AIC | inf | 3.897e+01 | -inf | True
Visualization table not available. Skipping.
dummy_myMode | M1_2:M1_2-00 | AIC | inf | 2.412e+01 | -inf | True
Visualization table not available. Skipping.
dummy_myMode | M1_3:M1_3-00 | AIC | inf | -4.705e+00 | -inf | True
--------------------New Selection--------------------
model0 | model | crit | model0_crit | model_crit | crit_diff | accept
Visualization table not available. Skipping.
dummy_myMode | M1_7:M1_7-00 | AIC | inf | 1.934e+01 | -inf | True
[23]:
plot_data = plot.PlotData(
models=petab_select_problem.state.models,
criterion=Criterion.AIC,
relative_criterion=False,
)
plot.graph_history(plot_data);