Repository navigation
Conversation
When diffsol gives up on a compiled model, the error now carries context instead of only "Newton solver failed" / "step size collapsed": - the last right-hand-side evaluation, if it returned non-finite derivatives, with the offending state names and the state that produced them (e.g. (c/x)^h turning NaN when x dips below zero) - non-finite entries in the last accepted state - a rescaling hint when the accepted state spans >= 8 orders of magnitude, reporting the extreme states and the active atol Diagnostics are attached only on failure. The RHS callback never turns a non-finite evaluation into an error by itself, so trial steps the solver recovers from behave exactly as before. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #382 +/- ##
==========================================
+ Coverage 84.75% 84.85% +0.10%
==========================================
Files 78 78
Lines 35818 35969 +151
==========================================
+ Hits 30356 30522 +166
+ Misses 5462 5447 -15
🚀 New features to boost your workflow:
|
Contributor
|
| Project | pharmsol |
| Branch | feat/solver-failure-diagnostics |
| Testbed | mhovd-pgx |
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
🚨 1 Alert
🐰 View full continuous benchmarking report in BencherThis branch has not been deployed
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.
Solver failures on compiled DSL models now carry a
Diagnostics:section instead of only "Newton solver failed" / "step size collapsed".atol).Diagnostics are added only on failure. The RHS callback only records non-finite evaluations and never errors on them, so solver behavior is unchanged.
DSL backend only; the closure
ODEpath is untouched. Tests: unit tests insrc/error/mod.rsandtests/dsl_solver_diagnostics.rs.🤖 Generated with Claude Code