Release v26.6.1.2 (patch)#5607
Closed
aabills wants to merge 6 commits into
Closed
Conversation
* Fix RegulariseSqrtAndPower corrupting state-independent bases RegulariseSqrtAndPower replaced every Sqrt/Power node with RegPower, including bases independent of the state such as pybamm.Parameter and pybamm.InputParameter rate constants. With the default scale of 1 this corrupts values below the regularisation tolerance (e.g. a ~1e-9 rate constant raised to 0.5 evaluated ~470x too small), causing solver failures or silently wrong overpotentials in user-supplied exchange-current density functions. Now only regularise bases that match a registered scale or depend on the state (variable/state vector/time). State-dependent normalised bases like (c_e / c_e_ref) ** (1 - alpha) used by built-in sets (ORegan2022, Chayambuka2022) keep their default-scale regularisation, and manually-created reg_power nodes (MSMR j0_j) are untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Add PR number to changelog entry Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 5946b8c)
* Harden serialisation round-trip tests; fix param-rebuild altitude and MSMR option gaps Follow-up to the tuple-options fix, addressing issues found while hardening the serialisation test suite. Rebuild param at the right altitude. The previous fix rebuilt a loaded lithium-ion model's `param` with an `isinstance` branch inside `load_custom_model`. Replace it with a model-owned `_rebuild_param` hook (no-op on `BaseModel`, overridden by the lithium-ion base model, which now also uses it in `__init__`). `load_custom_model` calls the hook, so the options setter stays free of param concerns and the fix lives where the model owns its derived state (#5598). Fix two MSMR option-validation gaps surfaced by option fuzzing. Both let an invalid option set crash later in parameter construction with "invalid literal for int() with base 10: 'none'" instead of raising a clean OptionError: - the all-or-nothing MSMR check missed MSMR inside a per-electrode tuple (`("MSMR", "single")`) because it compared the whole value to "MSMR"; - an all-MSMR model left on the default "number of MSMR reactions" ("none") passed validation, since the registry only lists that placeholder. Harden the serialisation test suite: - generative fuzzing of valid option dicts through to_json/from_json, with the construction guard narrowed to (OptionError, NotImplementedError) so real bugs surface instead of being silently rejected; - deterministic tuple-option and int-dimensionality round-trip coverage; - discretised round-trip now asserts structural identity, solution equivalence and event preservation, plus a non-default tuple option. Co-authored-by: Alec Bills <alexanderallenbills@gmail.com> * Address review: setter-owned param rebuild, per-electrode MSMR count, symptom assertion - Move `_rebuild_param` into the `BaseBatteryModel.options` setter so the options-derived `param` is kept in sync automatically. Drop the now-redundant explicit calls in `lithium_ion.BaseModel.__init__` and `Serialise` deserialise. Repurpose the obsolete `test_rebuild_param_syncs_param_with_reassigned_options` into `test_options_setter_rebuilds_param`, asserting the new invariant. - Fix an MSMR regression: validate `number of MSMR reactions` per electrode so a mixed cell (MSMR in one electrode, conventional with a "none" count in the other) is accepted again, while the genuine all-MSMR "none" default is still rejected early. Remove the now-dead `_is_positive_integer_count`; add `test_msmr_mixed_electrode_accepted`. - Strengthen `_assert_param_matches_options` with a symptom-level check: a two-phase negative electrode must name its primary active-material fraction "Primary: ...", guarding a stale/no-op rebuild beyond the dict comparison. * fix: MSMR option validation dependent on electrode domains --------- Co-authored-by: Alec Bills <alexanderallenbills@gmail.com> (cherry picked from commit 95db690)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## patch-base/v26.6.1.1 #5607 +/- ##
=======================================================
Coverage ? 98.07%
=======================================================
Files ? 339
Lines ? 31805
Branches ? 0
=======================================================
Hits ? 31194
Misses ? 611
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
648b55b to
c5bf2b1
Compare
Member
* docs: fix dead links breaking linkcheck CI Two notebook links 404 after the docs site reorganised, failing the linkChecker job and the Read the Docs linkcheck pre_build step on every branch: - source/api/simulation.html -> source/api/simulation/simulation.html - installation/gnu-linux-mac.html#optional-jaxsolver -> installation/index.html#optional-jaxsolver Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: ignore bpxstandard.com in lychee (WAF false positive) The site is live but its LiteSpeed anti-bot WAF returns 415 to CI/datacenter IPs, breaking the link checker even though the link is valid. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: re-trigger builds (transient GitHub 504s) No code changes. Earlier failures (lychee, test-data downloads, RTD sphinx-linkcheck) were all transient github.com 504 Gateway Timeouts on live links, not real breakages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit cf4ae1e)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c5bf2b1 to
be4a7aa
Compare
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Member
|
Also including #5575 |
Closed
Member
|
Ended up with enough changes to justify a new release of the month, superseded by #5617 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch release v26.6.1.2, cut from
v26.6.1.1per RELEASE.md "Cutting a patch release". PR base ispatch-base/v26.6.1.1(thev26.6.1.1tag) so the diff is just the cherry-picked fixes + version bump, and the test matrix runs on the release branch before tagging.Contents (cherry-picked from
main,-x)RegulariseSqrtAndPowerno longer regularises state-independent bases.load_custom_modelrebuilds the lithium-ionparamfrom restored options; two MSMR option-validation gaps now raise a cleanOptionError.Excludes the #5573 "voltage as a state" breaking change (lands in the next feature release).
Release steps
v26.6.1.2fromrelease/v26.6.1.2, publish GitHub release → triggers PyPIpip install pybamm==26.6.1.2mainrelease/v26.6.1.2andpatch-base/v26.6.1.1Do not merge this PR — the release is tagged from the branch; merging would duplicate the cherry-picked commits onto the base.
🤖 Generated with Claude Code