mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: still seem to be problems with random initialization
Date Sun, 05 Sep 2010 10:16:04 GMT
I found and fixed one instance where an RNG was not able to be seeded
by the RNG. It happens when a *test class* RNG is a static member and
initialized with the class. This happens at class load time before the
@Before method is called.

I'm not sure if that explains all the issues, but helps I guess. At
least, all tests passed even when I had the bit of code that returns
an unseeded RNG throw an exception.

Sean

On Sun, Sep 5, 2010 at 9:59 AM, Sean Owen <srowen@gmail.com> wrote:
> Yeah, could be so. Uncommons has one more seed generator, which
> accesses a source of entropy at random.org. This also seems
> potentially bad for end users.
>
> But I agree, during tests, if all is well, there should be no need of
> seed generation. I will send the debugger after this today.
>
> On Sat, Sep 4, 2010 at 9:23 PM, Ted Dunning <ted.dunning@gmail.com> wrote:
>> For instance in the latest hudson build, I see this:
>>
>> Running org.apache.mahout.math.jet.random.NormalTest
>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 231.75 sec
>>
>> But on my own machine, I see this:
>>
>> Running org.apache.mahout.math.jet.random.NormalTest
>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.89 sec
>>
>> I am pretty sure that this means that the uncommons math package will still
>> waiting for /dev/random.
>>
>> I don't think that switching to SecureRandom has helped.  In fact, I think
>> that SecureRandom is probably doing the same sort of
>> entropy collection as the old seeding policy used.
>>
>> It is also somewhat puzzling to me that these tests aren't using completely
>> deterministic seeds yet.  That was a bit part of what
>> Sean just did so I will look at that as well.
>>
>

Mime
View raw message