Skip to content

FEAT: compile serialization workspaces - #224

Open
redeboer wants to merge 3 commits into
feat/214-kinematic-mapfrom
feat/215-workspace-compiler
Open

FEAT: compile serialization workspaces#224
redeboer wants to merge 3 commits into
feat/214-kinematic-mapfrom
feat/215-workspace-compiler

Conversation

@redeboer

@redeboer redeboer commented Aug 5, 2026

Copy link
Copy Markdown
Member

Closes #215

✨ New features

  • Add compile_workspace(), which compiles selected symbolic workspace functions and distributions through TensorWaves, and the frozen CompiledWorkspace container for their callables, backend, coordinate maps, and selected independent coordinates.
  • Select named functions or distributions with targets; by default compile checksum targets, falling back to all workspace targets when no checksums exist.
  • Support lazy numpy and jax backends with actionable errors for unsupported backends, missing optional dependencies, and unknown targets.
  • Compile each selected distribution's serialized coordinate transformation with model masses substituted.
  • Allow callers to choose two independent Mandelstam coordinates and apply parameter_overrides without mutating the symbolic workspace.
  • Keep numerical imports and backend state outside Workspace, AmplitudeModel, and symbolic kinematics objects.

CompiledWorkspace and compile_workspace are re-exported from ampform_dpd.io.serialization.

🐛 Bug fixes

  • Reduce each distribution to its two independent Mandelstam invariants before compilation, preventing dependent-invariant inputs from being required at runtime.

🖱️ Developer experience

  • Cover named functions and distributions on NumPy and JAX, compiled coordinate maps, inferred and explicit invariant coordinates, parameter overrides, and invalid backend, target, and coordinate selections.

📝 Documentation

  • Disambiguate public CompiledWorkspace references for Sphinx API links.

Squash commit messages

* DOC: disambiguate CompiledWorkspace in API docs
* DX: test compiled workspace on NumPy and JAX
* FIX: reduce distributions before compilation

@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/215-workspace-compiler branch from ed9a3c6 to edda1c9 Compare August 5, 2026 20:29
@redeboer
redeboer force-pushed the feat/215-workspace-compiler branch from edda1c9 to d789efe Compare August 5, 2026 20:36
@redeboer redeboer self-assigned this Aug 5, 2026
@redeboer redeboer added 🖱️ DX Improvements to the Developer Experience 📝 Docs Improvements or additions to documentation labels Aug 5, 2026
@redeboer
redeboer force-pushed the feat/215-workspace-compiler branch from d789efe to dfa811f Compare August 6, 2026 04:53
@redeboer
redeboer force-pushed the feat/215-workspace-compiler branch from dfa811f to cd74460 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 📝 Docs Improvements or additions to documentation 🖱️ 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.

Add an external TensorWaves compiler for serialization workspaces

1 participant