Skip to content

Fix gCNV retry seed being deterministic and potentially negative#9346

Open
dami-gupta-git wants to merge 1 commit intobroadinstitute:masterfrom
dami-gupta-git:fix-9317
Open

Fix gCNV retry seed being deterministic and potentially negative#9346
dami-gupta-git wants to merge 1 commit intobroadinstitute:masterfrom
dami-gupta-git:fix-9317

Conversation

@dami-gupta-git
Copy link

When inference diverges and we retry, we were initializing Random with a constant seed via new Random(STARTING_SEED).nextInt(). This had two problems: the retry seed was always the same value, and nextInt() can return negative integers, which are rejected by numpy's RandomState in the Python script, This caused the retry to immediately crash rather than attempt convergence.

Fixed by using new Random().nextInt(Integer.MAX_VALUE) so the retry gets a genuinely different, non-negative seed each time.

Added a unit test to cover the new generateRetrySeed method.

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.

2 participants