We should not use both `seed` and `RNG`.
Opened this issue · 4 comments
alanlujan91 commented
We should only expose publicly the seed
variable, which internally sets the RNG. The user should never have to create or pass an RNG object, and should never have to use the RNG object directly.
Additionally, recommended seeds are huge strings or numbers, so we should not be using 12345
or the like to set the RNG.
alanlujan91 commented
For inspiration https://blog.scientific-python.org/numpy/numpy-rng/
llorracc commented
How about
314159265358979323846
?
I’m guessing that it’s not so much that “small seeds” are deprecated, as it is seeds that might be commonly chosen, like the first x digits of pi?
From: Alan Lujan ***@***.***>
Date: Wednesday, February 7, 2024 at 08:43
To: econ-ark/HARK ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [econ-ark/HARK] We should not use both `seed` and `RNG`. (Issue #1381)
We should only expose publicly the seed variable, which internally sets the RNG. The user should never have to create or pass an RNG object, and should never have to use the RNG object directly.
Additionally, recommended seeds are huge strings or numbers, so we should not be using 12345 or the like to set the RNG.
—
Reply to this email directly, view it on GitHub<#1381>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAKCK76HJ5MVCD7YNQE6QJ3YSOAILAVCNFSM6AAAAABC53LGUWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDGMBXGE3DGOI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
sbenthall commented
Yes, I agree, better discipline around this would be good. We must keep it in mind as we refactor. It is also something that we will need to think about for the DSL design.
llorracc commented
Actually, my fairly strong preference is to use the date at which you
choose the seed as the seed itself:
date +%Y%m%d%H%M%S
That way you can always decode when it was that you most recently set up
the seed without having to explore github history.
…On Wed, Feb 7, 2024 at 8:57 AM Christopher Carroll ***@***.***> wrote:
How about
314159265358979323846
?
I’m guessing that it’s not so much that “small seeds” are deprecated, as
it is seeds that might be commonly chosen, like the first x digits of pi?
*From: *Alan Lujan ***@***.***>
*Date: *Wednesday, February 7, 2024 at 08:43
*To: *econ-ark/HARK ***@***.***>
*Cc: *Subscribed ***@***.***>
*Subject: *[econ-ark/HARK] We should not use both `seed` and `RNG`.
(Issue #1381)
We should only expose publicly the seed variable, which internally sets
the RNG. The user should never have to create or pass an RNG object, and
should never have to use the RNG object directly.
Additionally, recommended seeds are huge strings or numbers, so we should
not be using 12345 or the like to set the RNG.
—
Reply to this email directly, view it on GitHub
<#1381>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKCK76HJ5MVCD7YNQE6QJ3YSOAILAVCNFSM6AAAAABC53LGUWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDGMBXGE3DGOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
- Chris Carroll