Skip to content

Make the placement master deterministic across runs - #76

Merged
edkerk merged 1 commit into
developfrom
fix/assign-compartments-determinism
Jul 18, 2026
Merged

Make the placement master deterministic across runs#76
edkerk merged 1 commit into
developfrom
fix/assign-compartments-determinism

Conversation

@edkerk

@edkerk edkerk commented Jul 18, 2026

Copy link
Copy Markdown
Member

The score-maximising placement MILP iterated genes_in_scope, a set, so string hash randomisation reordered its variables and constraints between processes and a degenerate objective returned a different co-optimal placement on each run.

Fix: iterate the genes sorted and pin the Gurobi solve (single thread, fixed seed, presolve level 2, zero MIP gap). A parameter sweep on the yeast master showed thread count, seed and presolve level are the settings that change which co-optimal placement is chosen. Verified deterministic across PYTHONHASHSEED values, and byte-identical to the MATLAB port's placement.

The score-maximising placement MILP iterated genes_in_scope, a set, so string
hash randomisation reordered its variables and constraints between processes and
a degenerate objective returned a different co-optimal placement on each run.
Iterate the genes sorted, and pin the Gurobi solve (single thread, fixed seed,
presolve level and zero MIP gap) so the same placement is returned every time.
A parameter sweep on the yeast master showed thread count, seed and presolve
level are the settings that change which co-optimal placement is chosen.
@edkerk
edkerk merged commit 242fb78 into develop Jul 18, 2026
8 checks passed
@edkerk
edkerk deleted the fix/assign-compartments-determinism branch July 18, 2026 20:33
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