fix: validate solver inputs and benchmark results - #398
Merged
Merged
Conversation
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.
QP calls with incomplete constraint pairs could silently solve a different problem, and the fast solver could report success for an infinite unconstrained solution. Validate dimensions and constraint pairs across the adapters, including during JIT tracing, and reject non-finite success while preserving existing backend failure codes and error messages.
Benchmark reporting now rejects missing required metrics, unknown comparison/objective metrics, empty experiments, and mismatched batch result counts. Explicitly unavailable measurements remain null in artifacts and N/A in the sweep display instead of becoming zero violations. Sweep objectives and safety decisions require measured, finite values.
Remove obsolete tutorial migration tests and commented solver scaffolding, add active equality/infeasibility coverage, and extend Ruff checks to scripts and optimization/benchmark tests in both CI and pre-commit. Document the benchmark result contract.
Validation:
Compatibility: incomplete benchmark records must now declare required keys. Use None for unavailable measurements; consumers must handle null summaries. Malformed QP inputs now fail explicitly instead of dropping constraints.