Skip to content

Expose trace storage traits for custom sequential runners - #77

Open
twiecki wants to merge 1 commit into
pymc-devs:mainfrom
twiecki:codex/public-storage-traits
Open

Expose trace storage traits for custom sequential runners#77
twiecki wants to merge 1 commit into
pymc-devs:mainfrom
twiecki:codex/public-storage-traits

Conversation

@twiecki

@twiecki twiecki commented Sep 6, 2026

Copy link
Copy Markdown
Member

Custom sequential runners can create a chain through the public API, but cannot use the existing Arrow (or other) trace backends because StorageConfig, TraceStorage, and ChainStorage are hidden behind a private module. Extracting per-draw statistics also needs the unexported StatsDims.

Re-export those existing types without changing their implementations. This lets a WASM runner call expanded_draw, record the returned values and statistics through ArrowConfig, and produce the same Arrow trace used by Nutpie instead of implementing a separate storage backend.

Validated with an external-crate regression test (cargo test --no-default-features --features arrow --test public_storage_api) and a release WASM adapter that records and serializes the resulting traces. The browser integration lives separately in https://github.com/pymc-labs/nuts-rs-wasm.

@twiecki
twiecki requested a review from aseyboldt September 6, 2026 01:08
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.85%. Comparing base (394c629) to head (b6f058e).
⚠️ Report is 158 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (394c629) and HEAD (b6f058e). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (394c629) HEAD (b6f058e)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #77       +/-   ##
===========================================
- Coverage   83.77%   66.85%   -16.93%     
===========================================
  Files           8       34       +26     
  Lines        1923     9413     +7490     
===========================================
+ Hits         1611     6293     +4682     
- Misses        312     3120     +2808     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants