Skip to content

Conversation

@25benjaminli
Copy link
Contributor

@25benjaminli 25benjaminli commented Aug 30, 2024

Fixes #7911, which describes how the RandSimulateLowResolutiond dictionary transform produces non-deterministic outputs, yet the typical array transform RandSimulateLowResolution produces deterministic ones.

Description

Inside of RandSimulateLowResolutiond, added the line self.sim_lowres_tfm.set_random_state(seed, state) in set_random_state to ensure the helper function sim_lowres_tfm is seeded and the transform can be performed deterministically.

Note: I also sifted through the other dictionary transforms with helper functions and did not find anything that looked problematic similar to this.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: BenjaminLi <25benjaminli@gmail.com>
Copy link
Member

@ericspod ericspod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, we can run the blossom tests and merge I think.

@KumoLiu
Copy link
Contributor

KumoLiu commented Sep 2, 2024

/build

@KumoLiu
Copy link
Contributor

KumoLiu commented Sep 2, 2024

/build

@KumoLiu KumoLiu merged commit c9b8bdb into Project-MONAI:dev Sep 2, 2024
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.

determinism (seeding) not working for transform RandSimulateLowResolutiond

3 participants