[ENH] Improve reproducibility#342
Conversation
|
Here's claude's rundown of common thread environment varibales: |
gdevenyi
left a comment
There was a problem hiding this comment.
Based on my reading here, I think:
OPENBLAS_NUM_THREADS=1 is needed anywhere scipy/numpy is used
TORCH_NUM_THREADS=1 is needed for tractoracle
This PR is really invasive, is it possible to set environment variables globally so we can more easily catch everything?
gagnonanthony
left a comment
There was a problem hiding this comment.
Great job! I noted the places where the seed arguments were not in the meta, otherwise minor comments here and there 😃
Applying those globally would require a |
|
You're inconsistent here between ants_random_seed and ants_rng_seed, and even random_seed in registration/ants |
Type of improvement
So far here are the automatic modifications:
export OMP_NUM_THREADS=${task.ext.single_thread ? 1 : task.cpus}
export MRTRIX_RNG_SEED=${task.ext.mrtrix_rng_seed ? task.ext.mrtrix_rng_seed : "1234"}
export OMP_NUM_THREADS=${task.ext.single_thread ? 1 : task.cpus}
export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=${task.ext.single_thread ? 1 : task.cpus}
export ANTS_RANDOM_SEED=${task.ext.ants_random_seed ?: "1234"}
I still need to check ressources for eddy/topup/fodf_msmt/noddi/freewater.
If submitting a new module or fixing a bug, please use the appropriate template.
Describe your improvement
Write a clear and concise description of what the improvement is.
Describe how to test your improvement
Provide a full step-by-step guide to test your improvement.
Checklist before requesting a review