Skip to content

FEAT: validate serialized checksums - #225

Open
redeboer wants to merge 2 commits into
feat/215-workspace-compilerfrom
feat/216-checksum-validation
Open

FEAT: validate serialized checksums#225
redeboer wants to merge 2 commits into
feat/215-workspace-compilerfrom
feat/216-checksum-validation

Conversation

@redeboer

@redeboer redeboer commented Aug 5, 2026

Copy link
Copy Markdown
Member

✨ New features

  • Add validate_checksums(), returning an immutable ChecksumResult for every checksum with its target, point name and values, numeric reference and result, absolute difference, pass state, and optional diagnostic.
  • Accept a symbolic Workspace, compiled on demand per checksum target, or reuse an existing CompiledWorkspace.
  • Parse real and complex serialized reference values, automatically apply distribution coordinate maps, and infer the symbolic variable for one-dimensional named functions.
  • Apply configurable atol and rtol using |value - reference| <= atol + rtol * |reference|.
  • Report missing targets, compilation or evaluation exceptions, and non-finite values as failed records instead of assertions or table-specific output.

ChecksumResult and validate_checksums are re-exported from ampform_dpd.io.serialization with no Pandas or plotting dependency.

🐛 Bug fixes

  • Compile checksum targets independently so one unsupported or deeply nested target produces its own diagnostic without aborting validation of the remaining targets.
  • Map single-coordinate named-function points to the function's actual symbolic variable instead of assuming serialized invariant naming.

🖱️ Developer experience

  • Cover real and complex values, NumPy/JAX parity, tolerance boundaries, named-function coordinates, missing targets, compilation failures, invalid evaluations, and non-finite output.

Squash commit messages

* DX: test checksum validation failure paths
* FIX: isolate checksum validation failures

@redeboer redeboer added this to the 0.4.2 milestone Aug 5, 2026
@redeboer redeboer added the ✨ Feature New feature added to the package label Aug 5, 2026
@redeboer
redeboer force-pushed the feat/216-checksum-validation branch from 53b4f34 to 85cab47 Compare August 5, 2026 20:29
@redeboer
redeboer force-pushed the feat/216-checksum-validation branch from 85cab47 to 0e74b33 Compare August 5, 2026 20:36
@redeboer redeboer self-assigned this Aug 5, 2026
@redeboer redeboer added the 🖱️ DX Improvements to the Developer Experience label Aug 5, 2026
@redeboer
redeboer force-pushed the feat/216-checksum-validation branch from 0e74b33 to 250f5b0 Compare August 6, 2026 04:57
@redeboer
redeboer force-pushed the feat/216-checksum-validation branch from 250f5b0 to 5ceb565 Compare August 6, 2026 04:59
@redeboer redeboer added the 🐛 Bug Something isn't working label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug Something isn't working 🖱️ DX Improvements to the Developer Experience ✨ Feature New feature added to the package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make serialized amplitude models easy to load and validate Validate serialized model checksums with structured results

1 participant