-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Description
Currently, many functions allow users to pass an Intor AbstractRNG as rng argument. In case of an integer, the integer converted to an AbstractRNG via
mk_rng(seed::T) where T <: Integer = Random.MersenneTwister(seed)There are multiple problems with this:
- This is unstable between Julia versions. So, people who write
rng=1would reasonably expect that the results are stable between Julia versions. This is not the case which is bad for reproducibility. - The code is littered with
mk_rngcalls. Usuallymk_rngis called immediately when entering the first public method. However, one exception is the threaded loop insrc/classification/main.jlandsrc/regression/main.jlwhere the code actually uses the integer to set the seed. - It is non-standard Julia. Packages always just take an
AbstractRNGso that the user can decide what type to use.
@ablaom Should we remove the integer functionality in the breaking change which is coming up with #167? Let me know if yes and I'll make a PR.
ablaom
Metadata
Metadata
Assignees
Labels
No labels