seed assignment based on target name has undesirable side effects #882
Replies: 3 comments 5 replies
-
In those situations, as you say, you can call |
Beta Was this translation helpful? Give feedback.
-
@wlandau I take it from the principle that reproducibility is the highest priority (which I agree with) that you may be unlikely to implement this idea, but would you consider an option to turn off the automatic seed-setting by target? I have encountered behavior where I run |
Beta Was this translation helpful? Give feedback.
-
ropensci/tarchetypes#111 and ropensci/tarchetypes#113 are already making the |
Beta Was this translation helpful? Give feedback.
-
There are situations where it is desirable for a given target to return different output each time the target is built. e.g., stochasticity in a monte carlo simulation. This is currently not possible because a seed is assigned based on the name of the target. Considering that the seed value is available in
tar_meta
and can be retrieved for reproducibility, why not allow the seed to change each run? The example below will always return the same value unless the target name is changed.We have found some weird workarounds like including this in the function that requires a random component,
which is why I didn't list it as a bug and opted to start a discussion around it.
Beta Was this translation helpful? Give feedback.
All reactions