Provide a random seed for sampling
domenicrosati opened this issue · 3 comments
domenicrosati commented
It would be great if we could provide a random seed for sampling so we can write determanistic tests.
What do you think @d4l3k ?
d4l3k commented
Yeah, that could certainly be helpful in certain situations. I'm hesitant to add seeds to every type since I'm worried it'll clutter up the API but it might be reasonable to add one generation per optimiser and pass it in via an optional flag.
Another thing to consider is calling rand.Seed(0) before your tests where you need determinism. Would that be enough for your use case or do you need to be able to specify the seed for each optimiser for parallel execution?
domenicrosati commented
that is perfect thanks! I am still new to go.
d4l3k commented
Glad I could help!
…On Wed, Jul 18, 2018, 14:39 Domenic Rosati ***@***.***> wrote:
that is perfect thanks! I am still new to go.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3fMP9UCeR9JjjSFYGxJCypj4xcChrDks5uH4DGgaJpZM4VSvs_>
.