Controlling randomness for reproducibility
See original GitHub issueThe 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:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@etetteh can you please open a PR so we can follow your development
Hey @etetteh I have a couple thoughts / suggestions but let me know if I’m missing something:
context[ConfigKW.RANDOM_SEED]
butcontext
is not defined inivadomed/loader/utils
which is the current call place forset_seed
set_seed
here we probably want to call insidemain.py
run_command
includescontext
as an input parameter so that might be one place to callset_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.