Skip to content

Conversation

martinjrobins
Copy link
Contributor

@martinjrobins martinjrobins commented Mar 13, 2025

Description

Fixes #4914

Note: as part of this change I've had to relax a lot of the test tolerances, due to the different default tolerances that we have for the IDAKLU solver. If users have existing code that uses the default solver and tolerances, this might fail suddenly when they upgrade. We have to think about how to handle this

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.

  • New feature (non-breaking change which adds functionality)

Key checklist:

  • No style issues: $ 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)
  • All tests pass: $ python -m pytest (or $ nox -s tests)
  • The documentation builds: $ python -m pytest --doctest-plus src (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ nox -s quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@martinjrobins martinjrobins requested a review from a team as a code owner March 13, 2025 20:01
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 86.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 98.64%. Comparing base (bc5f030) to head (153d77c).
Report is 81 commits behind head on develop.

Files with missing lines Patch % Lines
src/pybamm/solvers/idaklu_solver.py 85.71% 7 Missing ⚠️
src/pybamm/models/base_model.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4915      +/-   ##
===========================================
- Coverage    98.70%   98.64%   -0.06%     
===========================================
  Files          304      304              
  Lines        23701    23742      +41     
===========================================
+ Hits         23394    23421      +27     
- Misses         307      321      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

pipliggins
pipliggins previously approved these changes Apr 7, 2025
Copy link
Contributor

@pipliggins pipliggins left a comment

Choose a reason for hiding this comment

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

Looks good to me aside from the missing coverage + a changelog entry :)

Would adding a temporary warning on the base solver if the tolerances aren't the default values work for letting users know about the change?

@martinjrobins
Copy link
Contributor Author

Looks good to me aside from the missing coverage + a changelog entry :)

Would adding a temporary warning on the base solver if the tolerances aren't the default values work for letting users know about the change?

good idea, I've added a warning if users use the default solver. We can remove it after a couple of releases

@martinjrobins martinjrobins requested a review from pipliggins April 9, 2025 15:06
@MarcBerliner
Copy link
Member

@martinjrobins one minor request: can we also update the readme to use the IDAKLUSolver instead of casadi?

@martinjrobins
Copy link
Contributor Author

@martinjrobins one minor request: can we also update the readme to use the IDAKLUSolver instead of casadi?

good point, added this now

@martinjrobins martinjrobins merged commit d88beaf into develop Apr 10, 2025
24 of 26 checks passed
@martinjrobins martinjrobins deleted the i4914-idaklu-default branch April 10, 2025 07:58
@brosaplanella
Copy link
Member

I am a bit confused, did this make it in the release or not?

@agriyakhetarpal
Copy link
Member

No, it didn't make it to the release, @brosaplanella

@brosaplanella
Copy link
Member

brosaplanella commented Apr 10, 2025

Then we need to update the CHANGELOG, as it has included under the 25.4 section (I will try to draft the release notes over the weekend).

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.

change default solver to idaklu
5 participants