Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark Collection workflow fails for Lang_PLOSComputBiol2024 #2444

Closed
dweindl opened this issue May 14, 2024 · 2 comments
Closed

Benchmark Collection workflow fails for Lang_PLOSComputBiol2024 #2444

dweindl opened this issue May 14, 2024 · 2 comments
Labels
PEtab PEtab-import related

Comments

@dweindl
Copy link
Member

dweindl commented May 14, 2024

Benchmark Collection workflow fails with:

FAILED test_petab_benchmark.py::test_benchmark_gradient[Lang_PLOSComputBiol2024-True] - RuntimeWarning: divide by zero encountered in log
FAILED test_petab_benchmark.py::test_benchmark_gradient[Lang_PLOSComputBiol2024-False] - RuntimeWarning: divide by zero encountered in log

https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab/tree/master/Benchmark-Models/Lang_PLOSComputBiol2024

Check why we try to compute log(0) there.

@dweindl dweindl added the PEtab PEtab-import related label May 14, 2024
@dweindl
Copy link
Member Author

dweindl commented May 14, 2024

Check why we try to compute log(0) there.

Some log-scale parameters have a nominal value of 0 (parameter table discussion).

dweindl added a commit to dweindl/AMICI that referenced this issue May 15, 2024
The warning/error in AMICI-dev#2444 is caused by `petab.parameters.scale()`.
Whether this warning should be suppressed there or not is to discussed in the PEtab context.
For amici, I'd say we're fine with just accepting `np.log(0) == -inf` without a warnings.

Closes AMICI-dev#2444.
@dweindl
Copy link
Member Author

dweindl commented May 15, 2024

Needs to be checked whether this is an issue in amici or petab:

/home/runner/.local/lib/python3.11/site-packages/amici/petab/simulations.py:204: in simulate_petab
    fill_in_parameters(
/home/runner/.local/lib/python3.11/site-packages/amici/petab/conditions.py:76: in fill_in_parameters
    fill_in_parameters_for_condition(
/home/runner/.local/lib/python3.11/site-packages/amici/petab/conditions.py:148: in fill_in_parameters_for_condition
    map_sim_fix = {
/home/runner/.local/lib/python3.11/site-packages/amici/petab/conditions.py:149: in <dictcomp>
    key: _get_par(key, val, map_sim_fix)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

model_par = 'initial__Cyt__CCND_sim', value = 'ic_wt_Cyt__CCND'
mapping = {'_InitialConc1': 60220000000.0, '_InitialConc10': 50629691000.0, '_InitialConc11': 4648479700.0, '_InitialConc12': 242609110000.0, ...}

    def _get_par(model_par, value, mapping):
        """Replace parameter IDs in mapping dicts by values from
        problem_parameters where necessary"""
        if isinstance(value, str):
            try:
                # estimated parameter
                return problem_parameters[value]
            except KeyError:
                # condition table overrides must have been handled already,
                # e.g. by the PEtab parameter mapping, but parameters from
                # InitialAssignments may still be present.
>               if mapping[value] == model_par:
E               KeyError: 'ic_wt_Cyt__CCND'

/home/runner/.local/lib/python3.11/site-packages/amici/petab/conditions.py:131: KeyError

dweindl added a commit to dweindl/AMICI that referenced this issue May 15, 2024
Allows providing only a subset of parameter to simulate_petab. The missing parameters are taken from nominalValues in the parameter table.

Fixes AMICI-dev#2444
dweindl added a commit that referenced this issue May 15, 2024
Allows providing only a subset of parameter to simulate_petab. The missing parameters are taken from nominalValues in the parameter table.

Fixes #2444. Nevertheless, exclude `Lang_PLOSComputBiol2024` to save time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PEtab PEtab-import related
Projects
None yet
Development

No branches or pull requests

1 participant