You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/29 16:14:18 UTC

[GitHub] asitstands commented on a change in pull request #10313: Set random seed for test_random.test_shuffle

asitstands commented on a change in pull request #10313: Set random seed for test_random.test_shuffle
URL: https://github.com/apache/incubator-mxnet/pull/10313#discussion_r178107760
 
 

 ##########
 File path: tests/python/unittest/test_random.py
 ##########
 @@ -554,7 +554,7 @@ def compute_expected_prob():
     mx.test_utils.assert_almost_equal(exp_cnt_sampled.asnumpy(), exp_cnt[sampled_classes].asnumpy(), rtol=1e-1, atol=1e-2)
     mx.test_utils.assert_almost_equal(exp_cnt_true.asnumpy(), exp_cnt[true_classes].asnumpy(), rtol=1e-1, atol=1e-2)
 
-@with_seed()
+@with_seed(1)
 
 Review comment:
   @reminisce I tried the failed seed but the test passed. It could be from the difference of the environment. The failure was on Windows but I don't have a Windows machine. Seed 1 is not special at all. If it is special, that means the random number generator is very poor. There must be no special seed for good random number generators. More specifically 1 is not special for the generator `mt19937` used on CPU and `philox4_32_10` used on GPU.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services