Skip to content

feat: columnar ObservationFrame observation storage (#68)#74

Merged
schroedk merged 3 commits into
feature/slopesfrom
slopes/68-observation-storage
Jul 6, 2026
Merged

feat: columnar ObservationFrame observation storage (#68)#74
schroedk merged 3 commits into
feature/slopesfrom
slopes/68-observation-storage

Conversation

@schroedk

@schroedk schroedk commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Closes #68.

Replaces the Store trait and its backends (ArrayStore, FactorMajorStore, InternalStore) with a single Cow-backed columnar ObservationFrame: per-factor u32 level columns plus f64 loading columns (provisioning for varying slopes), length-validated at construction, with a row-aligned permuted gather backing the locality sort.

  • Design<S> / Solver<S>Design<'a> / Solver<'a>; from_storefrom_frame. Core, PyO3 boundary, tests, and benches rewired.
  • BuildError::ObservationCountMismatch reports the offending column index.
  • Cleanup pass: IntoDesign re-exported from the crate root and reused for the PySolver categories ingest; validate_weights moved onto Design; redundant FactorMajor bench arm dropped.
  • CHANGELOG updated with the breaking entries.

No Python surface change. Parity bench vs the pre-frame baseline: no regressions, −1…−6% on the input paths.

schroedk added 3 commits July 6, 2026 13:03
One u32 level column per factor plus f64 loading columns (provisioning
for varying slopes), each independently borrowed or owned via Cow.
Design/Solver trade the storage type parameter for a lifetime; ingest
normalizes any ArrayView2 layout to contiguous columns, and the
gather/scatter kernels read columns directly (scale as Option, hoisted
per chunk).
The negative-column-stride clause guarded ArrayStore's unsafe fast
path; to_slice()-based ingest borrows any stride-1 column zero-copy,
so only a non-unit row stride forces a copy.
@schroedk schroedk force-pushed the slopes/68-observation-storage branch from a2089b0 to 4026ff9 Compare July 6, 2026 11:56
@schroedk schroedk merged commit 52aa58c into feature/slopes Jul 6, 2026
3 checks passed
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.

1 participant