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.

image0

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 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]:
from petab_select import VIRTUAL_INITIAL_MODEL


# Helpers for plotting etc.
def get_labels(models):
    labels = {
        model.get_hash(): str(model.model_subspace_id)
        for model in models
        if model != VIRTUAL_INITIAL_MODEL
    }
    return labels


def get_digraph_labels(models, criterion):
    zero = min(model.get_criterion(criterion) for model in models)
    labels = {
        model.get_hash(): f"{model.model_subspace_id}\n{model.get_criterion(criterion) - zero:.2f}"
        for model in models
    }
    return labels


# 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
minimize_options = {
    "n_starts": 10,
    "filename": None,
    "progress_bar": False,
}

best_model_1, _ = pypesto_select_problem_1.select(
    method=Method.FORWARD,
    criterion=Criterion.AIC,
    minimize_options=minimize_options,
)
Specifying `minimize_options` as an individual argument is deprecated. Please instead specify it within some `model_problem_options` dictionary, e.g. `model_problem_options={"minimize_options": ...}`.
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
2024-02-06 09:12:11.012 - amici.petab.sbml_import - INFO - Importing model ...
2024-02-06 09:12:11.012 - amici.petab.sbml_import - INFO - Validating PEtab problem ...
Visualization table not available. Skipping.
2024-02-06 09:12:11.025 - amici.petab.sbml_import - INFO - Model name is 'caroModel_linear'.
Writing model code to '/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear'.
2024-02-06 09:12:11.026 - amici.petab.sbml_import - INFO - Species: 2
2024-02-06 09:12:11.027 - amici.petab.sbml_import - INFO - Global parameters: 5
2024-02-06 09:12:11.028 - amici.petab.sbml_import - INFO - Reactions: 3
2024-02-06 09:12:11.065 - amici.petab.sbml_import - INFO - Observables: 1
2024-02-06 09:12:11.065 - amici.petab.sbml_import - INFO - Sigmas: 1
2024-02-06 09:12:11.068 - amici.petab.sbml_import - DEBUG - Adding output parameters to model: ['noiseParameter1_obs_x2']
2024-02-06 09:12:11.069 - amici.petab.sbml_import - DEBUG - Adding initial assignments for dict_keys([])
2024-02-06 09:12:11.072 - amici.petab.sbml_import - DEBUG - Fixed parameters are ['observable_x2']
2024-02-06 09:12:11.073 - amici.petab.sbml_import - INFO - Overall fixed parameters: 1
2024-02-06 09:12:11.074 - amici.petab.sbml_import - INFO - Variable parameters: 5
2024-02-06 09:12:11.090 - amici.sbml_import - DEBUG - Finished processing SBML annotations        ++ (3.73E-04s)
2024-02-06 09:12:11.103 - amici.sbml_import - DEBUG - Finished gathering local SBML symbols       ++ (5.76E-03s)
2024-02-06 09:12:11.112 - amici.sbml_import - DEBUG - Finished processing SBML parameters         ++ (4.41E-04s)
2024-02-06 09:12:11.120 - amici.sbml_import - DEBUG - Finished processing SBML compartments       ++ (1.65E-04s)
2024-02-06 09:12:11.135 - amici.sbml_import - DEBUG - Finished processing SBML species initials  +++ (8.16E-04s)
2024-02-06 09:12:11.143 - amici.sbml_import - DEBUG - Finished processing SBML rate rules        +++ (1.85E-05s)
2024-02-06 09:12:11.144 - amici.sbml_import - DEBUG - Finished processing SBML species            ++ (1.55E-02s)
2024-02-06 09:12:11.153 - amici.sbml_import - DEBUG - Finished processing SBML reactions          ++ (1.68E-03s)
2024-02-06 09:12:11.162 - amici.sbml_import - DEBUG - Finished processing SBML rules              ++ (6.80E-04s)
2024-02-06 09:12:11.169 - amici.sbml_import - DEBUG - Finished processing SBML events             ++ (6.65E-05s)
2024-02-06 09:12:11.176 - amici.sbml_import - DEBUG - Finished processing SBML initial assignments++ (3.09E-05s)
2024-02-06 09:12:11.184 - amici.sbml_import - DEBUG - Finished processing SBML species references ++ (1.00E-04s)
2024-02-06 09:12:11.184 - amici.sbml_import - DEBUG - Finished importing SBML                      + (1.01E-01s)
2024-02-06 09:12:11.203 - amici.sbml_import - DEBUG - Finished processing SBML observables         + (1.06E-02s)
2024-02-06 09:12:11.212 - amici.sbml_import - DEBUG - Finished processing SBML event observables   + (1.85E-06s)
2024-02-06 09:12:11.242 - amici.de_export - DEBUG - Finished running smart_multiply               ++ (7.53E-04s)
2024-02-06 09:12:11.262 - amici.de_export - DEBUG - Finished simplifying xdot                    +++ (1.12E-03s)
2024-02-06 09:12:11.263 - amici.de_export - DEBUG - Finished computing xdot                       ++ (8.97E-03s)
2024-02-06 09:12:11.279 - amici.de_export - DEBUG - Finished simplifying x0                      +++ (1.33E-04s)
2024-02-06 09:12:11.280 - amici.de_export - DEBUG - Finished computing x0                         ++ (8.10E-03s)
2024-02-06 09:12:11.281 - amici.de_export - DEBUG - Finished importing SbmlImporter                + (4.54E-02s)
2024-02-06 09:12:11.319 - amici.de_export - DEBUG - Finished simplifying Jy                     ++++ (7.28E-03s)
2024-02-06 09:12:11.320 - amici.de_export - DEBUG - Finished computing Jy                        +++ (1.54E-02s)
2024-02-06 09:12:11.348 - amici.de_export - DEBUG - Finished simplifying y                      ++++ (1.21E-04s)
2024-02-06 09:12:11.349 - amici.de_export - DEBUG - Finished computing y                         +++ (8.38E-03s)
2024-02-06 09:12:11.365 - amici.de_export - DEBUG - Finished simplifying sigmay                 ++++ (1.04E-04s)
2024-02-06 09:12:11.365 - amici.de_export - DEBUG - Finished computing sigmay                    +++ (7.81E-03s)
2024-02-06 09:12:11.367 - amici.de_export - DEBUG - Finished writing Jy.cpp                       ++ (6.96E-02s)
2024-02-06 09:12:11.400 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (1.07E-02s)
2024-02-06 09:12:11.414 - amici.de_export - DEBUG - Finished simplifying dJydsigma              ++++ (3.14E-03s)
2024-02-06 09:12:11.415 - amici.de_export - DEBUG - Finished computing dJydsigma                 +++ (3.33E-02s)
2024-02-06 09:12:11.418 - amici.de_export - DEBUG - Finished writing dJydsigma.cpp                ++ (4.24E-02s)
2024-02-06 09:12:11.444 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (5.01E-03s)
2024-02-06 09:12:11.457 - amici.de_export - DEBUG - Finished simplifying dJydy                  ++++ (4.24E-03s)
2024-02-06 09:12:11.458 - amici.de_export - DEBUG - Finished computing dJydy                     +++ (2.64E-02s)
2024-02-06 09:12:11.462 - amici.de_export - DEBUG - Finished writing dJydy.cpp                    ++ (3.66E-02s)
2024-02-06 09:12:11.484 - amici.de_export - DEBUG - Finished simplifying Jz                     ++++ (1.05E-04s)
2024-02-06 09:12:11.485 - amici.de_export - DEBUG - Finished computing Jz                        +++ (7.97E-03s)
2024-02-06 09:12:11.486 - amici.de_export - DEBUG - Finished writing Jz.cpp                       ++ (1.48E-02s)
2024-02-06 09:12:11.506 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.55E-05s)
2024-02-06 09:12:11.515 - amici.de_export - DEBUG - Finished simplifying dJzdsigma              ++++ (8.05E-05s)
2024-02-06 09:12:11.516 - amici.de_export - DEBUG - Finished computing dJzdsigma                 +++ (1.59E-02s)
2024-02-06 09:12:11.516 - amici.de_export - DEBUG - Finished writing dJzdsigma.cpp                ++ (2.26E-02s)
2024-02-06 09:12:11.537 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.39E-05s)
2024-02-06 09:12:11.545 - amici.de_export - DEBUG - Finished simplifying dJzdz                  ++++ (7.66E-05s)
2024-02-06 09:12:11.546 - amici.de_export - DEBUG - Finished computing dJzdz                     +++ (1.57E-02s)
2024-02-06 09:12:11.547 - amici.de_export - DEBUG - Finished writing dJzdz.cpp                    ++ (2.27E-02s)
2024-02-06 09:12:11.567 - amici.de_export - DEBUG - Finished simplifying Jrz                    ++++ (8.41E-05s)
2024-02-06 09:12:11.568 - amici.de_export - DEBUG - Finished computing Jrz                       +++ (7.61E-03s)
2024-02-06 09:12:11.569 - amici.de_export - DEBUG - Finished writing Jrz.cpp                      ++ (1.42E-02s)
2024-02-06 09:12:11.589 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (5.96E-05s)
2024-02-06 09:12:11.597 - amici.de_export - DEBUG - Finished simplifying dJrzdsigma             ++++ (7.65E-05s)
2024-02-06 09:12:11.598 - amici.de_export - DEBUG - Finished computing dJrzdsigma                +++ (1.57E-02s)
2024-02-06 09:12:11.599 - amici.de_export - DEBUG - Finished writing dJrzdsigma.cpp               ++ (2.24E-02s)
2024-02-06 09:12:11.620 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.45E-05s)
2024-02-06 09:12:11.628 - amici.de_export - DEBUG - Finished simplifying dJrzdz                 ++++ (8.34E-05s)
2024-02-06 09:12:11.629 - amici.de_export - DEBUG - Finished computing dJrzdz                    +++ (1.64E-02s)
2024-02-06 09:12:11.630 - amici.de_export - DEBUG - Finished writing dJrzdz.cpp                   ++ (2.33E-02s)
2024-02-06 09:12:11.650 - amici.de_export - DEBUG - Finished simplifying root                   ++++ (1.28E-04s)
2024-02-06 09:12:11.651 - amici.de_export - DEBUG - Finished computing root                      +++ (7.59E-03s)
2024-02-06 09:12:11.652 - amici.de_export - DEBUG - Finished writing root.cpp                     ++ (1.43E-02s)
2024-02-06 09:12:11.682 - amici.de_export - DEBUG - Finished simplifying w                     +++++ (1.18E-03s)
2024-02-06 09:12:11.682 - amici.de_export - DEBUG - Finished computing w                        ++++ (9.48E-03s)
2024-02-06 09:12:11.694 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (2.03E-03s)
2024-02-06 09:12:11.704 - amici.de_export - DEBUG - Finished simplifying dwdp                   ++++ (5.15E-04s)
2024-02-06 09:12:11.704 - amici.de_export - DEBUG - Finished computing dwdp                      +++ (3.84E-02s)
2024-02-06 09:12:11.721 - amici.de_export - DEBUG - Finished simplifying spl                    ++++ (8.75E-05s)
2024-02-06 09:12:11.722 - amici.de_export - DEBUG - Finished computing spl                       +++ (7.93E-03s)
2024-02-06 09:12:11.737 - amici.de_export - DEBUG - Finished simplifying sspl                   ++++ (8.60E-05s)
2024-02-06 09:12:11.737 - amici.de_export - DEBUG - Finished computing sspl                      +++ (7.48E-03s)
2024-02-06 09:12:11.740 - amici.de_export - DEBUG - Finished writing dwdp.cpp                     ++ (8.01E-02s)
2024-02-06 09:12:11.762 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (2.03E-03s)
2024-02-06 09:12:11.772 - amici.de_export - DEBUG - Finished simplifying dwdx                   ++++ (7.36E-04s)
2024-02-06 09:12:11.772 - amici.de_export - DEBUG - Finished computing dwdx                      +++ (1.90E-02s)
2024-02-06 09:12:11.775 - amici.de_export - DEBUG - Finished writing dwdx.cpp                     ++ (2.75E-02s)
2024-02-06 09:12:11.783 - amici.de_export - DEBUG - Finished writing create_splines.cpp           ++ (1.74E-04s)
2024-02-06 09:12:11.811 - amici.de_export - DEBUG - Finished simplifying spline_values         +++++ (9.31E-05s)
2024-02-06 09:12:11.812 - amici.de_export - DEBUG - Finished computing spline_values            ++++ (9.13E-03s)
2024-02-06 09:12:11.821 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.20E-05s)
2024-02-06 09:12:11.829 - amici.de_export - DEBUG - Finished simplifying dspline_valuesdp       ++++ (7.98E-05s)
2024-02-06 09:12:11.830 - amici.de_export - DEBUG - Finished computing dspline_valuesdp          +++ (3.40E-02s)
2024-02-06 09:12:11.831 - amici.de_export - DEBUG - Finished writing dspline_valuesdp.cpp         ++ (4.08E-02s)
2024-02-06 09:12:11.859 - amici.de_export - DEBUG - Finished simplifying spline_slopes         +++++ (9.13E-05s)
2024-02-06 09:12:11.860 - amici.de_export - DEBUG - Finished computing spline_slopes            ++++ (8.37E-03s)
2024-02-06 09:12:11.869 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.09E-05s)
2024-02-06 09:12:11.877 - amici.de_export - DEBUG - Finished simplifying dspline_slopesdp       ++++ (7.93E-05s)
2024-02-06 09:12:11.877 - amici.de_export - DEBUG - Finished computing dspline_slopesdp          +++ (3.28E-02s)
2024-02-06 09:12:11.878 - amici.de_export - DEBUG - Finished writing dspline_slopesdp.cpp         ++ (3.96E-02s)
2024-02-06 09:12:11.900 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (2.80E-04s)
2024-02-06 09:12:11.909 - amici.de_export - DEBUG - Finished simplifying dwdw                   ++++ (7.06E-05s)
2024-02-06 09:12:11.909 - amici.de_export - DEBUG - Finished computing dwdw                      +++ (1.69E-02s)
2024-02-06 09:12:11.911 - amici.de_export - DEBUG - Finished writing dwdw.cpp                     ++ (2.43E-02s)
2024-02-06 09:12:11.936 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (4.19E-03s)
2024-02-06 09:12:11.945 - amici.de_export - DEBUG - Finished simplifying dxdotdw                ++++ (1.42E-04s)
2024-02-06 09:12:11.946 - amici.de_export - DEBUG - Finished computing dxdotdw                   +++ (2.14E-02s)
2024-02-06 09:12:11.949 - amici.de_export - DEBUG - Finished writing dxdotdw.cpp                  ++ (3.05E-02s)
2024-02-06 09:12:11.970 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (1.84E-04s)
2024-02-06 09:12:11.979 - amici.de_export - DEBUG - Finished simplifying dxdotdx_explicit       ++++ (7.76E-05s)
2024-02-06 09:12:11.979 - amici.de_export - DEBUG - Finished computing dxdotdx_explicit          +++ (1.66E-02s)
2024-02-06 09:12:11.980 - amici.de_export - DEBUG - Finished writing dxdotdx_explicit.cpp         ++ (2.38E-02s)
2024-02-06 09:12:12.001 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (2.25E-04s)
2024-02-06 09:12:12.010 - amici.de_export - DEBUG - Finished simplifying dxdotdp_explicit       ++++ (7.71E-05s)
2024-02-06 09:12:12.011 - amici.de_export - DEBUG - Finished computing dxdotdp_explicit          +++ (1.59E-02s)
2024-02-06 09:12:12.012 - amici.de_export - DEBUG - Finished writing dxdotdp_explicit.cpp         ++ (2.31E-02s)
2024-02-06 09:12:12.042 - amici.de_export - DEBUG - Finished running smart_jacobian            +++++ (4.02E-04s)
2024-02-06 09:12:12.052 - amici.de_export - DEBUG - Finished simplifying dydx                  +++++ (1.24E-04s)
2024-02-06 09:12:12.053 - amici.de_export - DEBUG - Finished computing dydx                     ++++ (1.94E-02s)
2024-02-06 09:12:12.071 - amici.de_export - DEBUG - Finished running smart_jacobian            +++++ (1.65E-04s)
2024-02-06 09:12:12.081 - amici.de_export - DEBUG - Finished simplifying dydw                  +++++ (7.97E-05s)
2024-02-06 09:12:12.082 - amici.de_export - DEBUG - Finished computing dydw                     ++++ (1.94E-02s)
2024-02-06 09:12:12.091 - amici.de_export - DEBUG - Finished simplifying dydx                   ++++ (1.07E-04s)
2024-02-06 09:12:12.091 - amici.de_export - DEBUG - Finished computing dydx                      +++ (6.53E-02s)
2024-02-06 09:12:12.093 - amici.de_export - DEBUG - Finished writing dydx.cpp                     ++ (7.29E-02s)
2024-02-06 09:12:12.122 - amici.de_export - DEBUG - Finished running smart_jacobian            +++++ (1.74E-04s)
2024-02-06 09:12:12.132 - amici.de_export - DEBUG - Finished simplifying dydp                  +++++ (7.87E-05s)
2024-02-06 09:12:12.133 - amici.de_export - DEBUG - Finished computing dydp                     ++++ (1.84E-02s)
2024-02-06 09:12:12.142 - amici.de_export - DEBUG - Finished simplifying dydp                   ++++ (7.36E-05s)
2024-02-06 09:12:12.143 - amici.de_export - DEBUG - Finished computing dydp                      +++ (3.58E-02s)
2024-02-06 09:12:12.144 - amici.de_export - DEBUG - Finished writing dydp.cpp                     ++ (4.31E-02s)
2024-02-06 09:12:12.159 - amici.de_export - DEBUG - Finished computing dzdx                      +++ (1.32E-04s)
2024-02-06 09:12:12.160 - amici.de_export - DEBUG - Finished writing dzdx.cpp                     ++ (7.20E-03s)
2024-02-06 09:12:12.174 - amici.de_export - DEBUG - Finished computing dzdp                      +++ (1.27E-04s)
2024-02-06 09:12:12.175 - amici.de_export - DEBUG - Finished writing dzdp.cpp                     ++ (6.91E-03s)
2024-02-06 09:12:12.190 - amici.de_export - DEBUG - Finished computing drzdx                     +++ (1.29E-04s)
2024-02-06 09:12:12.191 - amici.de_export - DEBUG - Finished writing drzdx.cpp                    ++ (6.98E-03s)
2024-02-06 09:12:12.204 - amici.de_export - DEBUG - Finished computing drzdp                     +++ (1.28E-04s)
2024-02-06 09:12:12.205 - amici.de_export - DEBUG - Finished writing drzdp.cpp                    ++ (6.90E-03s)
2024-02-06 09:12:12.226 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (1.52E-04s)
2024-02-06 09:12:12.235 - amici.de_export - DEBUG - Finished simplifying dsigmaydy              ++++ (7.90E-05s)
2024-02-06 09:12:12.236 - amici.de_export - DEBUG - Finished computing dsigmaydy                 +++ (1.66E-02s)
2024-02-06 09:12:12.237 - amici.de_export - DEBUG - Finished writing dsigmaydy.cpp                ++ (2.36E-02s)
2024-02-06 09:12:12.259 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (4.04E-04s)
2024-02-06 09:12:12.268 - amici.de_export - DEBUG - Finished simplifying dsigmaydp              ++++ (1.17E-04s)
2024-02-06 09:12:12.269 - amici.de_export - DEBUG - Finished computing dsigmaydp                 +++ (1.74E-02s)
2024-02-06 09:12:12.271 - amici.de_export - DEBUG - Finished writing dsigmaydp.cpp                ++ (2.52E-02s)
2024-02-06 09:12:12.279 - amici.de_export - DEBUG - Finished writing sigmay.cpp                   ++ (4.10E-04s)
2024-02-06 09:12:12.308 - amici.de_export - DEBUG - Finished simplifying sigmaz                +++++ (1.33E-04s)
2024-02-06 09:12:12.309 - amici.de_export - DEBUG - Finished computing sigmaz                   ++++ (8.54E-03s)
2024-02-06 09:12:12.318 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.23E-05s)
2024-02-06 09:12:12.327 - amici.de_export - DEBUG - Finished simplifying dsigmazdp              ++++ (7.93E-05s)
2024-02-06 09:12:12.328 - amici.de_export - DEBUG - Finished computing dsigmazdp                 +++ (3.45E-02s)
2024-02-06 09:12:12.329 - amici.de_export - DEBUG - Finished writing dsigmazdp.cpp                ++ (4.15E-02s)
2024-02-06 09:12:12.336 - amici.de_export - DEBUG - Finished writing sigmaz.cpp                   ++ (8.82E-06s)
2024-02-06 09:12:12.351 - amici.de_export - DEBUG - Finished computing stau                      +++ (1.24E-04s)
2024-02-06 09:12:12.351 - amici.de_export - DEBUG - Finished writing stau.cpp                     ++ (6.99E-03s)
2024-02-06 09:12:12.365 - amici.de_export - DEBUG - Finished computing deltax                    +++ (1.22E-04s)
2024-02-06 09:12:12.366 - amici.de_export - DEBUG - Finished writing deltax.cpp                   ++ (7.02E-03s)
2024-02-06 09:12:12.380 - amici.de_export - DEBUG - Finished computing deltasx                   +++ (1.32E-04s)
2024-02-06 09:12:12.381 - amici.de_export - DEBUG - Finished writing deltasx.cpp                  ++ (6.84E-03s)
2024-02-06 09:12:12.389 - amici.de_export - DEBUG - Finished writing w.cpp                        ++ (7.22E-04s)
2024-02-06 09:12:12.397 - amici.de_export - DEBUG - Finished writing x0.cpp                       ++ (6.67E-05s)
2024-02-06 09:12:12.418 - amici.de_export - DEBUG - Finished simplifying x0_fixedParameters     ++++ (8.91E-05s)
2024-02-06 09:12:12.418 - amici.de_export - DEBUG - Finished computing x0_fixedParameters        +++ (7.56E-03s)
2024-02-06 09:12:12.419 - amici.de_export - DEBUG - Finished writing x0_fixedParameters.cpp       ++ (1.46E-02s)
2024-02-06 09:12:12.441 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (7.86E-05s)
2024-02-06 09:12:12.449 - amici.de_export - DEBUG - Finished simplifying sx0                    ++++ (9.37E-05s)
2024-02-06 09:12:12.450 - amici.de_export - DEBUG - Finished computing sx0                       +++ (1.59E-02s)
2024-02-06 09:12:12.451 - amici.de_export - DEBUG - Finished writing sx0.cpp                      ++ (2.33E-02s)
2024-02-06 09:12:12.472 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (5.78E-05s)
2024-02-06 09:12:12.480 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (5.62E-05s)
2024-02-06 09:12:12.488 - amici.de_export - DEBUG - Finished simplifying sx0_fixedParameters    ++++ (7.13E-05s)
2024-02-06 09:12:12.488 - amici.de_export - DEBUG - Finished computing sx0_fixedParameters       +++ (2.31E-02s)
2024-02-06 09:12:12.489 - amici.de_export - DEBUG - Finished writing sx0_fixedParameters.cpp      ++ (3.03E-02s)
2024-02-06 09:12:12.498 - amici.de_export - DEBUG - Finished writing xdot.cpp                     ++ (1.07E-03s)
2024-02-06 09:12:12.506 - amici.de_export - DEBUG - Finished writing y.cpp                        ++ (3.58E-04s)
2024-02-06 09:12:12.526 - amici.de_export - DEBUG - Finished simplifying x_rdata                ++++ (1.13E-04s)
2024-02-06 09:12:12.526 - amici.de_export - DEBUG - Finished computing x_rdata                   +++ (7.71E-03s)
2024-02-06 09:12:12.528 - amici.de_export - DEBUG - Finished writing x_rdata.cpp                  ++ (1.48E-02s)
2024-02-06 09:12:12.549 - amici.de_export - DEBUG - Finished simplifying total_cl               ++++ (9.17E-05s)
2024-02-06 09:12:12.549 - amici.de_export - DEBUG - Finished computing total_cl                  +++ (7.64E-03s)
2024-02-06 09:12:12.550 - amici.de_export - DEBUG - Finished writing total_cl.cpp                 ++ (1.46E-02s)
2024-02-06 09:12:12.571 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.42E-05s)
2024-02-06 09:12:12.580 - amici.de_export - DEBUG - Finished simplifying dtotal_cldp            ++++ (7.99E-05s)
2024-02-06 09:12:12.581 - amici.de_export - DEBUG - Finished computing dtotal_cldp               +++ (1.61E-02s)
2024-02-06 09:12:12.581 - amici.de_export - DEBUG - Finished writing dtotal_cldp.cpp              ++ (2.29E-02s)
2024-02-06 09:12:12.602 - amici.de_export - DEBUG - Finished simplifying dtotal_cldx_rdata      ++++ (1.16E-04s)
2024-02-06 09:12:12.603 - amici.de_export - DEBUG - Finished computing dtotal_cldx_rdata         +++ (7.59E-03s)
2024-02-06 09:12:12.604 - amici.de_export - DEBUG - Finished writing dtotal_cldx_rdata.cpp        ++ (1.47E-02s)
2024-02-06 09:12:12.626 - amici.de_export - DEBUG - Finished simplifying x_solver               ++++ (1.21E-04s)
2024-02-06 09:12:12.626 - amici.de_export - DEBUG - Finished computing x_solver                  +++ (7.82E-03s)
2024-02-06 09:12:12.628 - amici.de_export - DEBUG - Finished writing x_solver.cpp                 ++ (1.55E-02s)
2024-02-06 09:12:12.649 - amici.de_export - DEBUG - Finished simplifying dx_rdatadx_solver      ++++ (1.45E-04s)
2024-02-06 09:12:12.650 - amici.de_export - DEBUG - Finished computing dx_rdatadx_solver         +++ (7.77E-03s)
2024-02-06 09:12:12.651 - amici.de_export - DEBUG - Finished writing dx_rdatadx_solver.cpp        ++ (1.51E-02s)
2024-02-06 09:12:12.672 - amici.de_export - DEBUG - Finished simplifying dx_rdatadp             ++++ (1.93E-04s)
2024-02-06 09:12:12.673 - amici.de_export - DEBUG - Finished computing dx_rdatadp                +++ (7.65E-03s)
2024-02-06 09:12:12.674 - amici.de_export - DEBUG - Finished writing dx_rdatadp.cpp               ++ (1.48E-02s)
2024-02-06 09:12:12.696 - amici.de_export - DEBUG - Finished running smart_jacobian             ++++ (6.35E-05s)
2024-02-06 09:12:12.704 - amici.de_export - DEBUG - Finished simplifying dx_rdatadtcl           ++++ (7.63E-05s)
2024-02-06 09:12:12.705 - amici.de_export - DEBUG - Finished computing dx_rdatadtcl              +++ (1.55E-02s)
2024-02-06 09:12:12.705 - amici.de_export - DEBUG - Finished writing dx_rdatadtcl.cpp             ++ (2.28E-02s)
2024-02-06 09:12:12.720 - amici.de_export - DEBUG - Finished computing z                         +++ (1.20E-04s)
2024-02-06 09:12:12.720 - amici.de_export - DEBUG - Finished writing z.cpp                        ++ (6.58E-03s)
2024-02-06 09:12:12.734 - amici.de_export - DEBUG - Finished computing rz                        +++ (1.21E-04s)
2024-02-06 09:12:12.735 - amici.de_export - DEBUG - Finished writing rz.cpp                       ++ (6.81E-03s)
2024-02-06 09:12:12.743 - amici.de_export - DEBUG - Finished generating cpp code                   + (1.45E+00s)
2024-02-06 09:12:29.810 - amici.de_export - DEBUG - Finished compiling cpp code                    + (1.71E+01s)
2024-02-06 09:12:29.815 - amici.petab.sbml_import - INFO - Finished Importing PEtab model            (1.88E+01s)
running AmiciInstall
running build_ext
------------------------------ model_ext ------------------------------
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.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
-- 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
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- original library suffixes: .so;.a
-- revised for static search: .a;.so;.a
-- major: #define SUITESPARSE_MAIN_VERSION    7
-- minor: #define SUITESPARSE_SUB_VERSION     0
-- patch: #define SUITESPARSE_SUBSUB_VERSION  1
-- Found SuiteSparse_config: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsuitesparseconfig.so (found version "7.0.1")
-- result:
-- SuiteSparse_config version: 7.0.1
-- SuiteSparse_config include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include
-- SuiteSparse_config library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsuitesparseconfig.so
-- SuiteSparse_config static:  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsuitesparseconfig.a
-- major: #define AMD_MAIN_VERSION   3
-- minor: #define AMD_SUB_VERSION    0
-- patch: #define AMD_SUBSUB_VERSION 3
-- Found AMD: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libamd.so (found version "3.0.3")
-- AMD version: 3.0.3
-- AMD include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include
-- AMD library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libamd.so
-- AMD static:  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libamd.a
-- major: #define BTF_MAIN_VERSION   2
-- minor: #define BTF_SUB_VERSION    0
-- patch: #define BTF_SUBSUB_VERSION 3
-- Found BTF: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libbtf.so (found version "2.0.3")
-- BTF version: 2.0.3
-- BTF include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include
-- BTF library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libbtf.so
-- BTF static:  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libbtf.a
-- major: #define COLAMD_MAIN_VERSION   3
-- minor: #define COLAMD_SUB_VERSION    0
-- patch: #define COLAMD_SUBSUB_VERSION 3
-- Found COLAMD: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libcolamd.so (found version "3.0.3")
-- COLAMD version: 3.0.3
-- COLAMD include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include
-- COLAMD library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libcolamd.so
-- COLAMD static:  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libcolamd.a
-- major: #define KLU_MAIN_VERSION   2
-- minor: #define KLU_SUB_VERSION    0
-- patch: #define KLU_SUBSUB_VERSION 3
-- Found KLU: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libklu.so (found version "2.0.3")
-- KLU version: 2.0.3
-- KLU include: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include
-- KLU library: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libklu.so
-- KLU static:  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/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.7") found components: C HL CXX
-- Found AMICI /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/cmake/Amici
-- Could NOT find Boost (missing: Boost_INCLUDE_DIR)
-- Found SWIG: /usr/bin/swig4.0 (found version "4.0.2")
-- Found Python3: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/bin/python (found version "3.11.6") found components: Interpreter Development Development.Module Development.Embed
-- Python extension suffix is .cpython-311-x86_64-linux-gnu.so
-- Configuring done (4.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext
Change Dir: '/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext'

Run Build Command(s): /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/bin/ninja -v
[1/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/dwdx.cpp
[2/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/dJydy.cpp
[3/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/dxdotdw.cpp
[4/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/x_solver.cpp
[5/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/w.cpp
[6/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/xdot.cpp
[7/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/wrapfunctions.cpp
[8/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/dsigmaydp.cpp
[9/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/dwdp.cpp
[10/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/caroModel_linear.cpp
[11/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/x_rdata.cpp
[12/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/Jy.cpp
[13/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/sigmay.cpp
[14/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/dJydsigma.cpp
[15/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/dydx.cpp
[16/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/create_splines.cpp
[17/21] /usr/bin/c++  -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/caroModel_linear/y.cpp
[18/21] : && /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/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/wrapfunctions.cpp.o CMakeFiles/caroModel_linear.dir/dJydy.cpp.o CMakeFiles/caroModel_linear.dir/dwdx.cpp.o CMakeFiles/caroModel_linear.dir/dxdotdw.cpp.o CMakeFiles/caroModel_linear.dir/x_solver.cpp.o CMakeFiles/caroModel_linear.dir/w.cpp.o CMakeFiles/caroModel_linear.dir/xdot.cpp.o CMakeFiles/caroModel_linear.dir/dsigmaydp.cpp.o CMakeFiles/caroModel_linear.dir/dwdp.cpp.o CMakeFiles/caroModel_linear.dir/x_rdata.cpp.o CMakeFiles/caroModel_linear.dir/caroModel_linear.cpp.o CMakeFiles/caroModel_linear.dir/Jy.cpp.o CMakeFiles/caroModel_linear.dir/sigmay.cpp.o CMakeFiles/caroModel_linear.dir/dJydsigma.cpp.o CMakeFiles/caroModel_linear.dir/dydx.cpp.o CMakeFiles/caroModel_linear.dir/create_splines.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/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext/swig && /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/cmake/data/bin/cmake -E make_directory /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext/swig/CMakeFiles/_caroModel_linear.dir /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext/swig /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext/swig/CMakeFiles/_caroModel_linear.dir && /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/cmake/data/bin/cmake -E env SWIG_LIB=/usr/share/swig4.0 /usr/bin/swig4.0 -python -I/home/docs/.asdf/installs/python/3.11.6/include/python3.11 -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/swig/.. -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include/../swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -I/usr/include/hdf5/serial -outdir /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext/swig -c++ -interface _caroModel_linear -I/home/docs/.asdf/installs/python/3.11.6/include/python3.11 -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/swig/.. -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include/../swig -o /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext/swig/CMakeFiles/_caroModel_linear.dir/caroModel_linearPYTHON_wrap.cxx /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/swig/caroModel_linear.i
[20/21] /usr/bin/c++ -D_caroModel_linear_EXPORTS -I/home/docs/.asdf/installs/python/3.11.6/include/python3.11 -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/swig/.. -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include/../swig -I/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/include -isystem /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/share/amici/swig -isystem /usr/include/hdf5/serial -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -O3 -DNDEBUG -std=gnu++17 -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/latest/doc/example/amici_models/0.21.1/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  -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/.asdf/installs/python/3.11.6/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial  /home/docs/.asdf/installs/python/3.11.6/lib/libpython3.11.so  libcaroModel_linear.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libamici.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_generic.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_nvecserial.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsolband.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunmatrixband.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsoldense.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunmatrixdense.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsolpcg.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsolspbcgs.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsolspfgmr.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsolspgmr.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsolsptfqmr.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunlinsolklu.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunmatrixsparse.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libklu.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libcolamd.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libbtf.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libamd.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsuitesparseconfig.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunnonlinsolnewton.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_sunnonlinsolfixedpoint.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_cvodes.a  /home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/libsundials_idas.a  -lm  /usr/lib/x86_64-linux-gnu/libblas.so  /usr/lib/x86_64-linux-gnu/libf77blas.so  /usr/lib/x86_64-linux-gnu/libatlas.so  /usr/lib/gcc/x86_64-linux-gnu/11/libgomp.so  /usr/lib/x86_64-linux-gnu/libpthread.a  -ldl  /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 && :

-- Install configuration: "Release"
-- Installing: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/caroModel_linear/./caroModel_linear.py
-- Installing: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/caroModel_linear/./_caroModel_linear.cpython-311-x86_64-linux-gnu.so
-- Installing: /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/caroModel_linear/lib/libcaroModel_linear.a
------------------------------ model_ext ------------------------------
running AmiciBuildCMakeExtension

==> Configuring:
$ cmake -S /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear -B /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/caroModel_linear -DCMAKE_MAKE_PROGRAM=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/bin/ninja -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_MODULE_PATH=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib/cmake/SuiteSparse;/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici/lib64/cmake/SuiteSparse -DKLU_ROOT=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/lib/python3.11/site-packages/amici -DAMICI_PYTHON_BUILD_EXT_ONLY=ON -DPython3_EXECUTABLE=/home/docs/checkouts/readthedocs.org/user_builds/pypesto/envs/latest/bin/python

==> Building:
$ cmake --build /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext --config Release

==> Installing:
$ cmake --install /home/docs/checkouts/readthedocs.org/user_builds/pypesto/checkouts/latest/doc/example/amici_models/0.21.1/caroModel_linear/build_model_ext


virtual_init | M1_0:649bcd9 | 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,
    minimize_options=minimize_options,
    predecessor_model=best_model_1,
)
Specifying `minimize_options` as an individual argument is deprecated. Please instead specify it within some `model_problem_options` dictionary, e.g. `model_problem_options={"minimize_options": ...}`.
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
M1_0:649bcd9 | M1_1:9202ace | AIC          | 3.698e+01    | -4.175e+00   | -4.115e+01   | True
Visualization table not available. Skipping.
M1_0:649bcd9 | M1_2:c773362 | AIC          | 3.698e+01    | -4.275e+00   | -4.125e+01   | True
Visualization table not available. Skipping.
M1_0:649bcd9 | M1_3:e03f5dc | 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 pypesto.visualize.select as pvs

selected_models = [best_model_1, best_model_2]
ax = pvs.plot_selected_models(
    [best_model_1, best_model_2],
    criterion=Criterion.AIC,
    relative=False,
    labels=get_labels(selected_models),
)
ax = pvs.plot_selected_models(
    [best_model_1, best_model_2],
    criterion=Criterion.AIC,
    labels=get_labels(selected_models),
)
ax.plot();
../_images/example_model_selection_15_0.png
../_images/example_model_selection_15_1.png
[8]:
pvs.plot_calibrated_models_digraph(
    problem=pypesto_select_problem_1,
    labels=get_digraph_labels(
        pypesto_select_problem_1.calibrated_models.values(),
        criterion=Criterion.AIC,
    ),
);
../_images/example_model_selection_16_0.png

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

petab_select_problem.model_space.reset_exclusions()
pypesto_select_problem_2 = pypesto.select.Problem(
    petab_select_problem=petab_select_problem
)

petab_yaml = "model_selection/example_modelSelection.yaml"
initial_model = Model(
    model_id="myModel",
    petab_yaml=petab_yaml,
    parameters=dict(
        k1=0.1,
        k2=ESTIMATE,
        k3=ESTIMATE,
    ),
    criteria={petab_select_problem.criterion: np.inf},
)

print("Initial model:")
print(initial_model)
Initial model:
model_id        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,
    minimize_options=minimize_options,
);
Specifying `minimize_options` as an individual argument is deprecated. Please instead specify it within some `model_problem_options` dictionary, e.g. `model_problem_options={"minimize_options": ...}`.
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
:myModel     | M1_1:9202ace | AIC          | inf          | 3.897e+01    | -inf         | True
Visualization table not available. Skipping.
:myModel     | M1_2:c773362 | AIC          | inf          | 2.411e+01    | -inf         | True
[11]:
initial_model_label = {initial_model.get_hash(): initial_model.model_id}

pvs.plot_calibrated_models_digraph(
    problem=pypesto_select_problem_2,
    labels={
        **get_digraph_labels(
            pypesto_select_problem_2.calibrated_models.values(),
            criterion=Criterion.AIC,
        ),
        **initial_model_label,
    },
);
../_images/example_model_selection_20_0.png

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.model_space.reset_exclusions()
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,
    minimize_options=minimize_options,
)
Specifying `minimize_options` as an individual argument is deprecated. Please instead specify it within some `model_problem_options` dictionary, e.g. `model_problem_options={"minimize_options": ...}`.
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
virtual_init | M1_0:649bcd9 | 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:649bcd9 | M1_1:9202ace | 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:9202ace | M1_4:3d668e2 | BIC          | -4.592e+00   | -2.899e+00   | 1.693e+00    | False
Visualization table not available. Skipping.
M1_1:9202ace | M1_5:d2503eb | 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:9202ace | M1_7:afa580e | BIC          | -4.592e+00   | -4.889e+00   | -2.975e-01   | True
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
[13]:
pvs.plot_selected_models(
    selected_models=best_models,
    criterion=Criterion.BIC,
    labels=get_labels(best_models),
);
../_images/example_model_selection_23_0.png
[14]:
pvs.plot_calibrated_models_digraph(
    problem=pypesto_select_problem_3,
    criterion=Criterion.BIC,
    relative=False,
    labels=get_digraph_labels(
        pypesto_select_problem_3.calibrated_models.values(),
        criterion=Criterion.BIC,
    ),
);
../_images/example_model_selection_24_0.png
[15]:
# Repeat with AICc and criterion_threshold == 10
petab_select_problem.model_space.reset_exclusions()
pypesto_select_problem_4 = pypesto.select.Problem(
    petab_select_problem=petab_select_problem
)
best_models = pypesto_select_problem_4.select_to_completion(
    method=Method.FORWARD,
    criterion=Criterion.AICC,
    select_first_improvement=True,
    startpoint_latest_mle=True,
    minimize_options=minimize_options,
    criterion_threshold=10,
)
Specifying `minimize_options` as an individual argument is deprecated. Please instead specify it within some `model_problem_options` dictionary, e.g. `model_problem_options={"minimize_options": ...}`.
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
virtual_init | M1_0:649bcd9 | AICc         | None         | 3.798e+01    | None         | True
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
M1_0:649bcd9 | M1_1:9202ace | 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.
M1_1:9202ace | M1_4:3d668e2 | AICc         | -1.754e-01   | 9.725e+00    | 9.901e+00    | False
Visualization table not available. Skipping.
M1_1:9202ace | M1_5:d2503eb | 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.
M1_1:9202ace | M1_7:afa580e | AICc         | -1.754e-01   | 3.594e+01    | 3.612e+01    | False
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
[16]:
pvs.plot_selected_models(
    selected_models=best_models,
    criterion=Criterion.AICC,
    labels=get_labels(best_models),
);
../_images/example_model_selection_26_0.png
[17]:
pvs.plot_calibrated_models_digraph(
    problem=pypesto_select_problem_4,
    criterion=Criterion.AICC,
    relative=False,
    labels=get_digraph_labels(
        pypesto_select_problem_4.calibrated_models.values(),
        criterion=Criterion.AICC,
    ),
);
../_images/example_model_selection_27_0.png

Multistart

Multiple model selections can be run by specifying multiple initial models.

[18]:
petab_select_problem.model_space.reset_exclusions()
pypesto_select_problem_5 = pypesto.select.Problem(
    petab_select_problem=petab_select_problem
)

initial_model_1 = Model(
    model_id="myModel1",
    petab_yaml=petab_yaml,
    parameters=dict(
        k1=0,
        k2=0,
        k3=0,
    ),
    criteria={petab_select_problem.criterion: np.inf},
)

initial_model_2 = Model(
    model_id="myModel2",
    petab_yaml=petab_yaml,
    parameters=dict(
        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,
    minimize_options=minimize_options,
)
Specifying `minimize_options` as an individual argument is deprecated. Please instead specify it within some `model_problem_options` dictionary, e.g. `model_problem_options={"minimize_options": ...}`.
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
:myModel1    | M1_1:9202ace | AIC          | inf          | 3.897e+01    | -inf         | True
Visualization table not available. Skipping.
:myModel1    | M1_2:c773362 | AIC          | inf          | -4.275e+00   | -inf         | True
Visualization table not available. Skipping.
:myModel1    | M1_3:e03f5dc | AIC          | inf          | -4.705e+00   | -inf         | True
--------------------New Selection--------------------
model0       | model        | crit         | model0_crit  | model_crit   | crit_diff    | accept
Visualization table not available. Skipping.
:myModel2    | M1_7:afa580e | AIC          | inf          | 1.934e+01    | -inf         | True
[19]:
initial_model_labels = {
    initial_model.get_hash(): initial_model.model_id
    for initial_model in initial_models
}

pvs.plot_calibrated_models_digraph(
    problem=pypesto_select_problem_5,
    criterion=Criterion.AIC,
    relative=False,
    labels={
        **get_digraph_labels(
            pypesto_select_problem_5.calibrated_models.values(),
            criterion=Criterion.AIC,
        ),
        **initial_model_labels,
    },
);
../_images/example_model_selection_30_0.png