Project-MONAI / Project-MONAI/MONAI

No randomness for threading=True

Open
#7,922 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

https://github.com/Project-MONAI/MONAI/blob/ac86ed43d7512929d90edec1e3a2c8fdf289eef1/monai/transforms/compose.py#L110

When using threading=True, the random state of any Randomizable transformation is only updated within its copy, thus the original random state will be untouched generating the same samples over and over.

I already saw that somewhere in the docs there is a mentioning of "limited randomness" for threading (even though I find that a rather optimistic description). Are there plans how to tackle this issue? Or won't it be supported?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with monai/transforms/compose.py around line 110 and inspect the threading=True path for Randomizable transformations. Determine how the original random state should be handled, then verify that threaded randomizable transforms no longer produce the same samples repeatedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.