-
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
Support valid AMICI noise distributions that are invalid in PEtab #1157
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## develop #1157 +/- ##
===========================================
- Coverage 88.16% 84.35% -3.82%
===========================================
Files 79 148 +69
Lines 5257 11681 +6424
===========================================
+ Hits 4635 9853 +5218
- Misses 622 1828 +1206
|
pypesto/petab/importer.py
Outdated
@@ -280,7 +281,7 @@ def create_model( | |||
logger.info( | |||
f"Compiling amici model to folder " f"{self.output_folder}." | |||
) | |||
self.compile_model(**kwargs) | |||
self.compile_model(validate=self.validate_petab, **kwargs) |
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.
This fails for pysb models. Pass validate
only if from petab.models import MODEL_TYPE_SBML; petab_problem.model.type_id == MODEL_TYPE_SBML
. Requires petab>=0.1.27
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.
👍
The PEtab importer will throw "invalid PEtab" errors if a user requests e.g. a negative binomial noise distribution. The user can skip the validation check with
PetabImporter(..., validate_petab=False)
. However, AMICI will still complain about the invalid PEtab [1], becausevalidate_petab
isn't passed to AMICI. This PR fixes this, s.t. users can use any AMICI noise distribution [2].[1] https://github.com/AMICI-dev/AMICI/blob/3c5e997df3655c26dde35705ef25b2a0f419fe8b/python/sdist/amici/petab_import.py#L565
[2] https://github.com/AMICI-dev/AMICI/blob/3c5e997df3655c26dde35705ef25b2a0f419fe8b/python/sdist/amici/import_utils.py#L182-L188