Repository navigation
datagen: child_of columns for hierarchical labels - #197
Merged
Merged
Conversation
A `child_of: <index>` column with `fan_out: f` nests under an earlier string column: its value is the parent row's value, a `.`, and a child index in [0, f) drawn from the column's own distribution. Bad indices, a fan_out that disagrees with the domain, and fields that would not mean what they say on a child are refused before drawing. Adds configs/datagen/hydra_hier.yaml (region 4 -> service 25 -> endpoint 25, status 4, user_id value) for the hydra rows, docs, and tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
…cuts
A uniform draw is continuous, so `uniform{0.0, 2.9}` with fan_out 2 drew
child indices 0, 1 and 2; child_of now requires whole uniform bounds.
hydra_hier_d2.yaml and hydra_hier_d3.yaml cut hydra_hier.yaml to its first
2 and 3 labels for the Hydra study's schema-width sweep.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
aqpbm-datagen: one new column kind.child_of: <index>withfan_out: fnests astringcolumn under an earlierstringcolumn: value = parent row's value +.+ child index in[0, f). The index is the column's own distribution draw (0-based rank in its domain), so the existing skew/seed options pick it, independently of the parent.child_ofwithoutfan_outor the reverse;child_ofnaming itself, a later column or no column; a non-string parent or child;fan_out: 0;fan_outdisagreeing with the distribution's domain size (or an unbounded distribution);cardinalityor astring:block on a child.configs/datagen/hydra_hier.yaml: region 4 → service fan-out 25 → endpoint fan-out 25, an independent status label (4, Zipf 2.0), then ani64value column (user_id, 1e6 Zipf 0.8). Same layout the hydra rows read: label columns (joined with;) then the value column.docs/aqpbm-datagen.md: achild_ofsection.ColumnSpecgains two optional fields, so the struct literals elsewhere getchild_of: None, fan_out: Noneand the checked-in record schema is regenerated.Why
Hydra study/eval work (§6.3) needs hierarchical label schemas (schema width d, nested groupings).
Tests
aqpbm-datagen(45 pass): determinism; every child value is<parent>.<i>withi < fan_out; distinct children per parent ≤ fan_out; the child index equals the column's own ranked draw, and Zipf(1.2) head share lands in its expected range;hydra_hier.yamlloads and generates 4 regions / 100 services as parents; one table-driven test for every validation error. Each was checked by mutation (index/2, dropped domain check).cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspaceclean.Evidence
rows=3 cols=1024)(insert numbers from the same command with
--operations insert --metrics throughput; release build, 200k records, 15 cell insertions each.)🤖 Generated with Claude Code
https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis