Skip to content

v2: fixes from the review before merging into main - #166

Merged
kvignesh1420 merged 2 commits into
v2from
v2-review-fixes
Nov 16, 2026
Merged

kvignesh1420 merged 2 commits into
v2from
v2-review-fixes

Conversation

@kvignesh1420

@kvignesh1420 kvignesh1420 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Eleven bugs found reviewing v2 before it merges into main, each confirmed with a repro, fixed and covered by a test.

Breaking

  • A table without a time column may not hold a key into a table with one (Schema raises). Its rows were kept at every time cut while pointing at events the cut drops (24 of 100 rows in the repro). SchemaPrior never built such schemas.
  • Categorical levels are strings. Categorical((1, 2, 3)) sampled but could not be written to parquet.

Moves draws (fingerprints updated for darwin-arm64 and linux X86_V4; X86_V3 still holds the old digests)

  • TablePrior columns read distinct slots. Before, 45 of 200 default tables had columns that were relabelled copies of others, which leaks a target.
  • Structured missingness blanks at its rate. It now uses a numeric indicator node and missing_by, instead of a two-class node whose logit bias ran 1.7× over its rate at the median (now 1.00×).
  • A time series whose autocorrelation is too small to divide by is its noise. SchemaPrior seed 1355 failed with 'n3' produced non-finite values.
  • Blanks no longer change the values left in a column with a range by level (1383 of 1395 changed before).
  • Ranged causes draw in the order of their keys, so {"a": r, "b": r} and {"b": r, "a": r} draw the same.

Errors and fixes that move no draws

  • Negating a shaped Range mirrors its shape.
  • A TablePrior with zero weight on every family that fits any widths raises when built.
  • A Derived function that returns other than one value per row raises a ValueError instead of an IndexError.
  • realize handles a key with given positions into a counted table (was KeyError).
  • missing_by may name a one-dimensional Hidden node.

Lint, pyright, 361 tests, README blocks and recipes pass locally. 300 fresh SchemaPrior databases (seeds 1200–1499), written and checked: positional keys, no dangling keys, sorted times, no child before its parent, no infinities.

@kvignesh1420
kvignesh1420 force-pushed the v2-review-fixes branch 2 times, most recently from c916152 to d6e3fae Compare November 16, 2026 22:52
A static table may not point at events; categorical levels are strings; TablePrior columns
read distinct slots; structured missingness blanks at its rate; a tiny autocorrelation is its
noise; blanks keep a ByLevel column's values; ranged causes draw in key order; a negated
shaped Range mirrors its shape; clearer errors for zero-weight edge families and Derived
shapes; realize handles given positions into a counted table.
@kvignesh1420
kvignesh1420 merged commit c013355 into v2 Nov 16, 2026
5 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