You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] Implement "random" nullary function that generates uniform random between 0 and 1 #28196
Eduardo Ponce / @edponce:
I will work on this, but want to be clear with the requirement. Arrow has non-nullary uniform random number generators that generate N numbers which are defined in the testing module (.e.g, random_real()). The nullary random() will be included in the random namespace and make use of the GenerateOptions?
Antoine Pitrou / @pitrou:
No, this shouldn't use any functionality defined in testing, as it is not built by default. Also, we won't necessarily want to use the same random number generator or initialization parameters.
(see also ARROW-10797 for a slightly related topic)
yibocai#1:
If we are to implement from scratch a method other than std::uniform_real_distribution , it's better to take into account issue ARROW-12533.
Eduardo Ponce / @edponce:
Thanks! I know that code duplication is a "code smell" but compute and testing layers are independent of each other. As I understand Arrow does not (yet) has a well-defined common submodule to supply utility functions across layers, and this might be further limited if APIs of same functions vary across layers.
Antoine Pitrou / @pitrou:
That said, I'll reiterate that a RNG for testing needn't have the same properties as a RNG exposed as a public API. We need to be a bit more careful about the public API RNG:
Eduardo Ponce / @edponce:
Thanks for feedback @pitrou. I will definitely be careful with the public RNG. Will circle back on this when I get a stable implementation.
Activity
asfimport commentedon Apr 15, 2021
Antoine Pitrou / @pitrou:
@edponce
asfimport commentedon Apr 15, 2021
Eduardo Ponce / @edponce:
I will work on this, but want to be clear with the requirement. Arrow has non-nullary uniform random number generators that generate N numbers which are defined in the testing module (.e.g, random_real()). The nullary random() will be included in the random namespace and make use of the GenerateOptions?
asfimport commentedon Apr 15, 2021
Antoine Pitrou / @pitrou:
No, this shouldn't use any functionality defined in
testing, as it is not built by default. Also, we won't necessarily want to use the same random number generator or initialization parameters.(see also ARROW-10797 for a slightly related topic)
asfimport commentedon Apr 25, 2021
yibocai#1:
If we are to implement from scratch a method other than std::uniform_real_distribution , it's better to take into account issue ARROW-12533.
asfimport commentedon May 11, 2021
Eduardo Ponce / @edponce:
Hi @cyb70289,
I am working on this issue and noticed that you submitted #10283 for ARROW-12533. Can I duplicate the RNGs for the compute layer?
asfimport commentedon May 11, 2021
yibocai#1:
Sure, @edponce
asfimport commentedon May 11, 2021
Eduardo Ponce / @edponce:
Thanks! I know that code duplication is a "code smell" but compute and testing layers are independent of each other. As I understand Arrow does not (yet) has a well-defined common submodule to supply utility functions across layers, and this might be further limited if APIs of same functions vary across layers.
asfimport commentedon May 11, 2021
Antoine Pitrou / @pitrou:
Utility code goes into
arrow/util/;)asfimport commentedon May 11, 2021
Antoine Pitrou / @pitrou:
That said, I'll reiterate that a RNG for testing needn't have the same properties as a RNG exposed as a public API. We need to be a bit more careful about the public API RNG:
asfimport commentedon May 11, 2021
Eduardo Ponce / @edponce:
Thanks for feedback @pitrou. I will definitely be careful with the public RNG. Will circle back on this when I get a stable implementation.
asfimport commentedon Dec 30, 2021
Antoine Pitrou / @pitrou:
Issue resolved by pull request 11864
#11864