Skip to content
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

User option to fail if model needs to be compiled #2289

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

dilpath
Copy link
Member

@dilpath dilpath commented Feb 14, 2024

e.g. in model selection, often a single superset model is compiled in advance, then many pyPESTO problems/AMICI models are loaded during model selection, by loading and customizing the superset model. If the model is not compiled in advance, this can lead to many models being compiled simultaneously into the same output directory.

The job usually fails immediately, and is easy to fix. Recently, a user reported that they forgot to compile in advance, but the jobs didn't fail immediately. Instead, the job failed after the first iteration of model selection, which took some hours. Somehow, each of their 8 parallel model selection jobs all compiled the AMICI model separately into the same directory, and were able to complete model selection, but then the next set of jobs failed, due to model import/compilation issues.

This PR allows users to set compile_=False, in the case that the user knows there must be an error if the model needs to be compiled.

@dilpath dilpath requested a review from a team as a code owner February 14, 2024 13:35
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fa7c0bd) 77.78% compared to head (7ff5adf) 77.75%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2289      +/-   ##
===========================================
- Coverage    77.78%   77.75%   -0.03%     
===========================================
  Files          318      318              
  Lines        20511    20511              
  Branches      1436     1436              
===========================================
- Hits         15954    15948       -6     
- Misses        4554     4560       +6     
  Partials         3        3              
Flag Coverage Δ
cpp 73.53% <ø> (-0.03%) ⬇️
cpp_python 33.99% <ø> (ø)
petab 36.40% <ø> (ø)
python 72.30% <ø> (-0.03%) ⬇️
sbmlsuite ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
python/sdist/amici/petab/petab_import.py 66.66% <ø> (ø)

... and 2 files with indirect coverage changes

@dilpath
Copy link
Member Author

dilpath commented Feb 14, 2024

I think the errors are unrelated, e.g. the 4 failing C++/Python tests are all due to

FAILED python/tests/test_bngl.py::test_compare_to_pysb_simulation[Motivating_example_cBNGL] - ValueError: ComplexPatterns that span multiple volume compartments must have these volume compartments separated by a single surface compartment.

@FFroehlich
Copy link
Member

I think the errors are unrelated, e.g. the 4 failing C++/Python tests are all due to

FAILED python/tests/test_bngl.py::test_compare_to_pysb_simulation[Motivating_example_cBNGL] - ValueError: ComplexPatterns that span multiple volume compartments must have these volume compartments separated by a single surface compartment.

Yes, those are unrelated, will have a closer look at what's going on.

Copy link
Member

@FFroehlich FFroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@FFroehlich
Copy link
Member

I think the errors are unrelated, e.g. the 4 failing C++/Python tests are all due to

FAILED python/tests/test_bngl.py::test_compare_to_pysb_simulation[Motivating_example_cBNGL] - ValueError: ComplexPatterns that span multiple volume compartments must have these volume compartments separated by a single surface compartment.

Yes, those are unrelated, will have a closer look at what's going on.

hopefully fixed in pysb/pysb@52570c3

@FFroehlich FFroehlich changed the base branch from master to develop February 15, 2024 17:33
@dilpath
Copy link
Member Author

dilpath commented Feb 15, 2024

hopefully fixed in pysb/pysb@52570c3

Oh nice, thanks for the quick fix there! Fine with me to leave this open until the next PySB comes out, although I'm unfamiliar with the dev cycle there.

@dilpath dilpath added this pull request to the merge queue Feb 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 16, 2024
@FFroehlich FFroehlich added this pull request to the merge queue Feb 16, 2024
@dilpath dilpath removed this pull request from the merge queue due to a manual request Feb 16, 2024
Copy link

sonarcloud bot commented Feb 16, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@dilpath dilpath added this pull request to the merge queue Feb 16, 2024
Merged via the queue into develop with commit 5bd921f Feb 16, 2024
31 of 32 checks passed
@dilpath dilpath deleted the feature_do_not_compile branch February 16, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants