Skip to content

Commit

Permalink
Fix tests.petab_test_suite.test_petab_suite.check_derivatives
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Jun 12, 2024
1 parent 96fba45 commit eba3a87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/sdist/amici/petab/import_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,10 @@ def get_fixed_parameters(
# check global parameters
if not petab_problem.model.has_entity_with_id(fixed_parameter):
# TODO: could still exist as an output parameter?
# TODO: or in the parameters table
logger.warning(
f"Column '{fixed_parameter}' used in condition "
"table but not entity with the corresponding ID "
"table but no entity with the corresponding ID "
"exists. Ignoring."
)
fixed_parameters.remove(fixed_parameter)
Expand Down
3 changes: 2 additions & 1 deletion tests/petab_test_suite/test_petab_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ def check_derivatives(
problem_parameters=problem_parameters,
):
# check_derivatives does currently not support parameters in ExpData
model.setParameters(edata.parameters)
# set parameter scales before setting parameter values!
model.setParameterScale(edata.pscale)
model.setParameters(edata.parameters)
edata.parameters = []
edata.pscale = amici.parameterScalingFromIntVector([])
amici_check_derivatives(model, solver, edata)
Expand Down

0 comments on commit eba3a87

Please sign in to comment.