-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve random transforms reproducibility #226
Conversation
Codecov Report
@@ Coverage Diff @@
## master #226 +/- ##
==========================================
+ Coverage 91.29% 91.41% +0.11%
==========================================
Files 88 89 +1
Lines 3700 3740 +40
==========================================
+ Hits 3378 3419 +41
+ Misses 322 321 -1
Continue to review full report at Codecov.
|
f3529c8
to
515420b
Compare
Hi I am still not sure, that to do not have the possibility to add 'normal parameter" in the history, (as it was before) is a good idea, Let consider random Elastic where you have to specify the num_control_point, having only the seed saved in the history, will allow to reproduce the same transform, if and only if you put the same num_control_point Other drawback of this changes, is for simple transform without random choise (like rescale or normalization), I would like to add the chosen parameter in the history too, but with those changes, you can now only log seed ... non ? |
The problem with this implementation is that intensity transforms use different parameters for the different images in the
Because the user has control over what parameters they passed to the transform. |
yes but it makes the code more difficult (with hard coded parameter valuer), I really thing it will be more efficient to read it directly from the history (given the fact it is so simple to add !) applying transform and reading parameters, should be dissociate I can think at an example where you do not know : let say you want to compare the influence of num_control_point, and you define OneOf transform with 2 randomElastic call each of them with different num_control_point |
sorry to insist, but I really like to convince you on this point Once you performed multiple experiment, with different transform, it is convenient to just have a look to save history in order to know what has been applied It is also a way to check that every thing was done as planed (which is important too) The objective is to be able to recreate a given transformed volume (because the model is very bad for this volume) why should I need to remember which num_control_point I set (or which percentiles I set for RescaleIntensity) if those parameters can be stored in the history I have an autonomous mechanism to reproduce the given transform without prior knowledge don't you think it is much better so ? If there are some drawback to store all parameters, let's make it optional, but I think it is a great feature, to make this full parameter recording possible |
given what has been discuss here #238 we will need a more complex transforms history ... |
Add seed to dict only if transformed Subject Add method to generate seed Add reproducibility tests Update tests Fix docstring Update CLI tool Add get_transform function Use JSON to store transforms history Update transforms Rename function to get transform class
515420b
to
169c235
Compare
Resolves #191, #208.
I will also add docs on reproducibility, and maybe a notebook.