DickJC123 opened a new issue #18736:
URL: https://github.com/apache/incubator-mxnet/issues/18736


   ## Description
   The following code in test_numpy_interoperability.py sets a numpy seed 
unilaterally, thereby making deterministic the random numbers used in 
subsequent unittests: 
https://github.com/apache/incubator-mxnet/blob/2abf0b8c2b3361c73c9dfdeabdb8a88278b693d0/tests/python/unittest/test_numpy_interoperability.py#L515-L528
   
   Also, since the code is executed on import of the file, this sets the seed 
in advance of the with_seed() mechanism, thereby forcing determinism on a large 
number of other modules that import this test file, including 
test_operator_gpu.py.
   We clearly want to get back to our usual mode of running tests 
non-deterministically with different random data each time, to ensure a robust 
framework.  Thus, having noticed this issue during the development of my 
current PR https://github.com/apache/incubator-mxnet/pull/18694, I have 
included a fixing commit 
https://github.com/apache/incubator-mxnet/pull/18694/commits/6567b61d219fa984d5c1b8c3987990ca04b73575
 .
   
   @vexilligera and @reminisce, could you review my fix and comment, or suggest 
an alternative fix via another PR?  For example, you may want to evaluate 
whether the test is able to support non-deterministic shapes.  Or, you may want 
to evaluate whether performing all the set-up functions of this test module 
lazily on first use, rather than as done currently at file import, is generally 
a better practice.  Thanks.
   ### Error Message
   
   I noticed this problem when different runs of the CI would flag the same 
failing test with the same rnd seed. [Output not retained]
   
   ## What have you tried to solve it?
   
   1.  See referenced PR and fixing commit
   2.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to