-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
Standardise BaseSolver.solve() multiprocessing context to fork
#3975
Standardise BaseSolver.solve() multiprocessing context to fork
#3975
Conversation
...tion/test_models/test_full_battery_models/test_lithium_ion/test_compare_outputs_two_phase.py
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3975 +/- ##
========================================
Coverage 99.58% 99.58%
========================================
Files 257 257
Lines 21251 21254 +3
========================================
+ Hits 21163 21166 +3
Misses 88 88 ☔ View full report in Codecov by Sentry. |
The Windows tests are still failing, I guess it is related to the fact that |
This is now ready for merge for those that have permissions. It's worth noting that this only fixes #3974 for Longer term, @martinjrobins and I discussed moving to a more robust solution by implementing the multiprocessing in C++. |
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.
looks good, just need approval from @kratman, then can merge
@BradyPlanden If this does not fix the problem on windows, is the task completed? Merging this PR will close the issue. |
I would recommend we merge this and reopen (or unlink) #3974 to continue discussion on a longer-term solution that doesn't depend on the |
Yeah I think it should be unlinked or a new ticket opened for the windows side |
…amm-team#3975) * Enforce multiprocessing context fork, add example & updt integration test * updt changelog * Add OS conditional context --------- Co-authored-by: Eric G. Kratz <[email protected]>
Description
This PR updated the multiprocess pool to be constructed with context
fork
fordarwin
andlinux
platforms. It also adds an example and updates integration tests to use the list of dictionaries input functionality which should ensure this get tested in script formation.Fixes #3974
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: