Context
Pipeline functions in leadforge/pipelines/build_v5.py accept np.random.RandomState directly. The rest of the package standardizes on leadforge.core.rng.RNGRoot with named substreams for deterministic derivation.
Now that these functions are in-package, they should follow the same convention.
What to do
- Change pipeline function signatures to accept a seed (int) and derive per-step sub-RNGs via
RNGRoot, OR accept an RNGRoot and call .child("subsample") etc.
- Update
scripts/build_v5_snapshot.py orchestration to pass seed/RNGRoot instead of raw RandomState
- Verify determinism is preserved (same seed → same output)
- Update tests accordingly
Considerations
np.random.RandomState is legacy; np.random.Generator is preferred for new code
RNGRoot currently wraps random.Random — may need a numpy substream method
Origin
Copilot review comment on PR #30.
Context
Pipeline functions in
leadforge/pipelines/build_v5.pyacceptnp.random.RandomStatedirectly. The rest of the package standardizes onleadforge.core.rng.RNGRootwith named substreams for deterministic derivation.Now that these functions are in-package, they should follow the same convention.
What to do
RNGRoot, OR accept anRNGRootand call.child("subsample")etc.scripts/build_v5_snapshot.pyorchestration to pass seed/RNGRoot instead of rawRandomStateConsiderations
np.random.RandomStateis legacy;np.random.Generatoris preferred for new codeRNGRootcurrently wrapsrandom.Random— may need a numpy substream methodOrigin
Copilot review comment on PR #30.