feat(zenpicker): i8 vs f16 agreement example + load_meta_picker_v0_1 + lib.rs additions#76
feat(zenpicker): i8 vs f16 agreement example + load_meta_picker_v0_1 + lib.rs additions#76lilith wants to merge 1 commit into
Conversation
…+ lib.rs additions
8fc1f8f to
3ed2ff4
Compare
|
Rebased onto current Obsolescence assessment (per-piece, vs current
|
| Piece | Verdict | Evidence on main |
|---|---|---|
MetaPicker.family_at_output field + family_at_output() accessor |
still-novel | main's MetaPicker struct has only predictor: Predictor<'b> — no cache field, no accessor |
Subset-aware validate_family_order (parse + length check, subset OK) |
still-novel | main still does exact-match if raw == ALL_LABELS_CSV { Ok } else { Err(FamilyOrderMismatch) } |
parse_family_csv helper + 4 unit tests |
still-novel | absent from main |
Subset-aware pick (maps argmin idx through the bake's order) |
still-novel | main's pick still does `pick.map( |
pick_with_time_cost (size/time tradeoff via ArgminOffsets + ScoreTransform::Exp) |
still-novel | absent from main |
examples/i8_vs_f16_agreement.rs, examples/load_meta_picker_v0_1.rs |
still-novel | zenpicker/examples/ does not exist on main |
Nothing here is superseded — main's MetaPicker is still the pre-subset, exact-match version. So this is a "still applicable, needs adaptation" PR, not a close-candidate.
What changed during the rebase (916 commits behind)
Single API adaptation, driven by the zenpredict 0.2.0 change that made Model own its data and Predictor/MetaPicker borrow it:
MetaPicker::new(model: Model<'b>)→MetaPicker::new(model: &'b Model). Conflict was confined toMetaPicker::new(this PR rewrote its docstring+body for thefamily_at_outputcache; main independently changed the signature to&'b Model). Resolution: kept main's&'b Modelborrow signature, folded in this PR's cache-on-construction logic (Predictor::new(model)andmodel.metadata()/.n_outputs()are both shared borrows, so no borrowck issue).- Both examples updated to
MetaPicker::new(&model)(Models bound before the pickers; they outlive the borrows). - One clippy
unusual_byte_groupingsfix on the example RNG seed (0xC0FFEE_42DE_AD15→0x00C0_FFEE_42DE_AD15), surfaced now that--all-targetschecks the examples. cargo fmtreflow of the new code to current rustfmt.
The bake feature is not referenced anywhere in this PR, so no bake→advanced migration was needed.
Green gate (local, on the rebased commit 3ed2ff4)
cargo build -p zenpicker -> ok
cargo test -p zenpicker --lib -> ok (10 passed; incl. 5 new: parse_family_csv_* x4 + time_cost_table_uses_codec_family_index)
cargo clippy -p zenpicker --all-targets -- -D warnings -> ok
cargo build -p zenpicker --examples -> ok
cargo fmt -p zenpicker --check -> ok
Force-pushed (lease) to feat/zenpicker-i8-agreement; tip is now 3ed2ff4d4d1b9db6c030ca651845055b5f1c4cd5, 1 commit on top of main (66d08f6), only the 3 in-scope files (+458/-19).
Note (not addressed, out of scope): i8_vs_f16_agreement.rs's header comment says it "falls back to a 1000-row synthetic sample if the TSV is absent" but the body always uses 5000 synthetic samples and never reads the TSV — pre-existing doc/code drift in the original commit. Both examples also point at absolute /home/lilith/oracle-d2-store/... bake paths, so cargo run needs those artifacts present; they build fine without them.
|
Closing without merging. Decision: per-request family restriction is the caller's job via the existing Branch |
Summary
Single commit on top of the merged three-crate rename. Adds two zenpicker examples and lib.rs additions.
Files
Test plan