question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Controlling randomness for reproducibility

See original GitHub issue

The current implementation of ivadomed only sets the random number generator seed for splitting a dataset into train, validation and test sets. However, there are other sources of randomness that we need to take into consideration, such as 1) the Numpy library 2) Pytorch library 3) Python itself 4) CUDA etc. We may use this reference

The main reason is seeding the dataset splitting alone, still leaves some sources of randomness unchecked. Also, if a user decides to use a .joblib file to split the data as documented here , the random_state won’t be used, but we still need to control other sources of randomness.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
jcohenadadcommented, Mar 7, 2022

@etetteh can you please open a PR so we can follow your development

1reaction
uzaymacarcommented, Mar 5, 2022

Hey @etetteh I have a couple thoughts / suggestions but let me know if I’m missing something:

  • You want to do context[ConfigKW.RANDOM_SEED] but context is not defined in ivadomed/loader/utils which is the current call place for set_seed
  • Instead of calling set_seed here we probably want to call inside main.py
  • run_command includes context as an input parameter so that might be one place to call set_seed. This is also good for the visibility and logical ordering of the function and as we usually want to set seeds the first thing in the script.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Controlling Randomness — Sacred 0.8.3 documentation
Controlling this randomness is key to ensure reproducibility of the results. This typically happens by manually seeding the Pseudo Random Number Generator ......
Read more >
Managing Randomness to Enable ... - ACM Digital Library
In this study, random number generation is controlled by regulating the pseudo-random number generator seed to ensure the same generation ...
Read more >
Reproducibility — PyTorch 1.13 documentation
First, you can control sources of randomness that can cause multiple executions of your application to behave differently. Second, you can configure PyTorch ......
Read more >
Randomness — reproducible-builds.org
Random data will make builds unreproducible and must be avoided. If random-like input is required, the solution is to use a predetermined value...
Read more >
How can I fully control randomness for reproducible training??
请提出你的问题 Please ask your question Are there any ways to fully control randomness to reproduce training results?? I am using GPUs for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found