Repository navigation
v0.4.1 — multi-sheet best-of-K multi-start (nest_multi restarts=) - #2
Merged
Merged
Conversation
Extends the v0.4.0 multi-start density lever to the multi-sheet spill path. Each sheet is now packed with the densest of K decorrelated-seed runs *before* the leftover demand spills to the next, so a denser earlier sheet reduces what spills forward — fewer sheets / less material on a mixed-parts job. - optimizer: nest_multi_multistart / nest_multi_multistart_per_item (additive). nest_multi / nest_multi_per_item now delegate with n_starts=1, which is byte-identical to before (nest_multistart_per_item(seed,1) == nest_per_item). - ironnest façade re-exports both; the wheel's nest_multi() gains an optional restarts=1 kwarg (backward-compatible; >1 packs each sheet best-of-K). - Determinism: each sheet's best-of-K is the audited byte-deterministic reduction; within a sheet the K runs decorrelate (sheet_seed + k) independent of the cross-sheet stride; the spill loop is pure integer/Vec ops. The `parallel` feature applies automatically (each sheet's K starts run on threads). - tests: restarts=1 == nest_multi byte-identity, determinism + broadcast==per_item, and never-places-fewer-than-single (proven for the greedy homogeneous spill). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rts=) Extends 0.4.0's multi-start density lever to the multi-sheet spill: nest_multi gains an optional restarts= kwarg (per-sheet best-of-K) + new additive nest_multi_multistart / nest_multi_multistart_per_item. restarts=1 is byte- identical to before; the existing golden is untouched (nest_multi is orchestration over the goldened single-sheet path). Parallel feature threads each sheet's K runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Extends v0.4.0's best-of-K multi-start density lever to the multi-sheet spill path. Additive and backward-compatible —
restarts=1is byte-identical to today.nest_multi(..., restarts=8)(wheel kwarg) packs each sheet best-of-K before leftover demand spills to the next, so a denser earlier sheet reduces what spills forward → fewer sheets / less material on a mixed-parts job.nest_multi_multistart/nest_multi_multistart_per_item(additive);nest_multi/nest_multi_per_itemnow delegate withn_starts=1(byte-identical:nest_multistart_per_item(seed, 1)==nest_per_item).parallelfeature applies automatically — each sheet's K runs execute on threads (GIL released).Determinism
Holds by composition: each sheet's best-of-K is the already-audited byte-deterministic reduction (integer/
total_cmparea argmax, earliest-k on tie); within a sheet the K runs decorrelate viasheet_seed + kindependent of the cross-sheet stride; the spill loop is pure integer/Vec ops. No new floats, threads, or RNG. The single-container golden is untouched (nest_multiis orchestration over the goldened path).Verification
cargo testdefault 49 /--features parallel50 green (3 new:restarts=1byte-identity, determinism + broadcast==per_item, never-places-fewer-than-single — proven for the greedy homogeneous spill)cargo clippy -D warningsgreen in both feature configs (raw output) ·cargo fmt --checkclean · py wheel compilesPost-merge
Tag
v0.4.1onmainafter merge to trigger the PyPI trusted-publisher build.🤖 Generated with Claude Code