When we have an AmiciObjective and need to compute gradients, we should make sure that sensitivities can be computed w.r.t. all free parameters (this needs to be checked when constructing AmiciObjective, and whenever additional parameters are ixed). I.e. we need to check whether all non-fixed parameters exist in amici_model.getParameterIds(), taking into account AmiciObjective.parameter_mapping.
This is particularly important for PEtab import, where we aren't necessarily able to compute sensitivities w.r.t. to all parameters (https://github.com/AMICI-dev/AMICI/pull/2456).
Related to https://github.com/AMICI-dev/AMICI/issues/2455
When we have an
AmiciObjective
and need to compute gradients, we should make sure that sensitivities can be computed w.r.t. all free parameters (this needs to be checked when constructingAmiciObjective
, and whenever additional parameters are ixed). I.e. we need to check whether all non-fixed parameters exist inamici_model.getParameterIds()
, taking into accountAmiciObjective.parameter_mapping
.This is particularly important for PEtab import, where we aren't necessarily able to compute sensitivities w.r.t. to all parameters (https://github.com/AMICI-dev/AMICI/pull/2456).