-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix startpoint sampling for PEtab-derived problems with fixed parameters #1169
Conversation
Startpoint sampling for PetabImporter-derived problems didn't work correctly in case parameters were fixed in addition to those marked estimate=0 in the underlying PEtab problem. Fixing any parameters after the construction of the pypesto.Problem and the corresponding startpoint method would lead to errors in during startpoint sampling, because the list of fixed parameters was never updated. In order to fix that, we need to have the current pypesto.Problem available for startpoint sampling to get access to the fixed parameters. Accessing `pypesto.Problem` is not compatible with the current `FunctionStartpoints`, therefore we derive a new `PetabStartpoints` class from `CheckedStartpoints.sample`.
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## develop #1169 +/- ##
===========================================
- Coverage 88.16% 81.73% -6.44%
===========================================
Files 79 148 +69
Lines 5257 11693 +6436
===========================================
+ Hits 4635 9557 +4922
- Misses 622 2136 +1514
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if this was solved by harmonizing pypesto_problem.x_free_indices
with parameter_df[ESTIMATE]
as having two distinct locations where parameter can be fixed is bound to be confusing. What happens if a parameter is fixed in petab but not pypesto_problem.x_free_indices
? What happens if different values are specified in petab/pypesto?
Could be implemented by implementing setters for pypesto_problem.x_free_indices
that alter the petab problem (if one is present).
After The problem to be addressed here is that for the start point sampling we currently still need to look up the initialization priors in the The alternative would be creating a new |
Okay, what could be done to make things look slightly nicer: Instead of checking for PEtab- EDIT: did that. or something similar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this. I do agree with your argument, that basically we do not use the petab.Problem anymore after the importer. Therefore I think this is a reasonable solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Co-authored-by: Fabian Fröhlich <fabian@schaluck.com>
Startpoint sampling for
PetabImporter
-derived problems didn't work correctly in case any parameters were fixed in addition to those markedestimate=0
in the underlying PEtab problem.Fixing any parameters after the construction of the
pypesto.Problem
and the corresponding startpoint method would lead to errors during startpoint sampling because the list of fixed parameters was never updated.In order to fix that, we need to have the current
pypesto.Problem
available for startpoint sampling to get access to the currently fixed parameters. Accessingpypesto.Problem
is not compatible with the currentFunctionStartpoints
. Therefore, we derive a newPetabStartpoints
class fromCheckedStartpoints.sample
that will allow forwarding/accessing theProblem
.