Skip to content

Make galaxy-table seeding deterministic across processes#16

Merged
bryce-wedig merged 1 commit into
mainfrom
fix-galaxy-table-seed-determinism
Jul 7, 2026
Merged

Make galaxy-table seeding deterministic across processes#16
bryce-wedig merged 1 commit into
mainfrom
fix-galaxy-table-seed-determinism

Conversation

@bryce-wedig

Copy link
Copy Markdown
Collaborator

The per-table seed in 01a used hash((global_seed, 'table', table_index)), whose string element is hashed non-deterministically per process via PYTHONHASHSEED. This defeated the configured seed:42 reproducibility and made test_pipeline_run flaky: some CI runs drew a galaxy population with zero detectable lenses, so 01b wrote no detectable_gglenses*.pkl and 02 raised FileNotFoundError.

Use an all-integer tuple, matching 01b's process-stable pattern, so the draw is reproducible on every machine/run. The trailing 0 keeps table seeds distinct from 01b's run seeds.

The per-table seed in _01a used hash((global_seed, 'table', table_index)),
whose string element is hashed non-deterministically per process via
PYTHONHASHSEED. This defeated the configured seed:42 reproducibility and made
test_pipeline_run flaky: some CI runs drew a galaxy population with zero
detectable lenses, so 01b wrote no detectable_gglenses_*.pkl and 02 raised
FileNotFoundError.

Use an all-integer tuple, matching 01b's process-stable pattern, so the draw
is reproducible on every machine/run. The trailing 0 keeps table seeds distinct
from 01b's run seeds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bryce-wedig
bryce-wedig merged commit 0838477 into main Jul 7, 2026
1 check passed
@bryce-wedig
bryce-wedig deleted the fix-galaxy-table-seed-determinism branch July 7, 2026 06:17
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