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 2020/07/16 18:37:25 UTC

[GitHub] [incubator-mxnet] DickJC123 opened a new issue #18736: unittest/test_numpy_interoperability.py inadvertently puts additional unittests on a fixed seed

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:
users@infra.apache.org



[GitHub] [incubator-mxnet] szha closed issue #18736: unittest/test_numpy_interoperability.py inadvertently puts additional unittests on a fixed seed

Posted by GitBox <gi...@apache.org>.
szha closed issue #18736:
URL: https://github.com/apache/incubator-mxnet/issues/18736


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-mxnet] DickJC123 commented on issue #18736: unittest/test_numpy_interoperability.py inadvertently puts additional unittests on a fixed seed

Posted by GitBox <gi...@apache.org>.
DickJC123 commented on issue #18736:
URL: https://github.com/apache/incubator-mxnet/issues/18736#issuecomment-659621773


   While technically a different issue, test_numpy_interoperability.py has a spurious print statement: https://github.com/apache/incubator-mxnet/blob/2abf0b8c2b3361c73c9dfdeabdb8a88278b693d0/tests/python/unittest/test_numpy_interoperability.py#L2896-L2902
   
   I've removed this in PR https://github.com/apache/incubator-mxnet/pull/18694 commit https://github.com/apache/incubator-mxnet/pull/18694/commits/3d47acba82e44b6b731ff048905472c8c0c2f8de.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-mxnet] szha commented on issue #18736: unittest/test_numpy_interoperability.py inadvertently puts additional unittests on a fixed seed

Posted by GitBox <gi...@apache.org>.
szha commented on issue #18736:
URL: https://github.com/apache/incubator-mxnet/issues/18736#issuecomment-660710800


   fixed by #18694 


----------------------------------------------------------------
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:
users@infra.apache.org