ICB-DCM / parPE

Parameter estimation for dynamical models using high-performance computing, batch and mini-batch optimizers, and dynamic load balancing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during HDF5 file generation with preequilibration and species in condition table

LeonardSchmiester opened this issue · comments

I get an error of the form

Traceback (most recent call last):
  File "/home/leonard/Documents/projects/toolboxes/parPE/build/venv/bin/parpe_petab_to_hdf5", line 33, in <module>
    sys.exit(load_entry_point('parpe', 'console_scripts', 'parpe_petab_to_hdf5')())
  File "/home/leonard/Documents/projects/toolboxes/parPE/python/parpe/hdf5_pe_input.py", line 1092, in main
    h5gen.generate_file(args.hdf5_file_name)
  File "/home/leonard/Documents/projects/toolboxes/parPE/python/parpe/hdf5_pe_input.py", line 123, in generate_file
    self._generate_simulation_to_optimization_parameter_mapping()
  File "/home/leonard/Documents/projects/toolboxes/parPE/python/parpe/hdf5_pe_input.py", line 426, in _generate_simulation_to_optimization_parameter_mapping
    condition_idx)
  File "/home/leonard/Documents/projects/toolboxes/parPE/build/venv/lib/python3.7/site-packages/petab/parameter_mapping.py", line 533, in merge_preeq_and_sim_pars_condition
    'Cannot handle different values for dynamic '
ValueError: Cannot handle different values for dynamic parameters: for condition 0 parameter initial_A_preeq is 2.0 for preeq and 0.0 for simulation.

when generating the hdf5 files for models with preequilibration and species in the condition table. The problem seems to be, that the dummy simulation parameter is set to 0 (https://github.com/ICB-DCM/parPE/blob/develop/python/parpe/hdf5_pe_input.py#L377), which leads to the PEtab error. Should be fixable by setting the dummy value to the same one as used for preeq, right? At least this fixed the problem for the CanPathPro model. Will create a pull request.

I am not completely sure if that will do the right thing. Did it work in your case? I'd like to have some additional test cases for that (PEtab-dev/petab_test_suite#30)

Did it work in your case?

Tested it for Speedy and compared llh values with AMICI simulation. That looked ok.

I'd like to have some additional test cases for that (PEtab-dev/petab_test_suite#30)

I can set up a test case for this in the next days.