leezu commented on issue #19255:
URL: 
https://github.com/apache/incubator-mxnet/issues/19255#issuecomment-707285710


   The implementation is based on the with_seed function, thus things work 
alike. In particular, what you describe works. Please see:
   
   ```
   % python3 -m pytest 
../tests/python/unittest/test_deferred_compute.py::test_indexing_empty_shape 
--count 3 --log-cli-level=DEBUG
   
=================================================================================
 test session starts 
=================================================================================
   platform linux -- Python 3.8.5, pytest-6.0.2, py-1.9.0, pluggy-0.13.1
   rootdir: /home/ubuntu/src/mxnet-master, configfile: pytest.ini
   plugins: timeout-1.4.2, repeat-0.8.0, env-0.6.2
   timeout: 1200.0s
   timeout method: signal
   timeout func_only: False
   collected 3 items
   
   
../tests/python/unittest/test_deferred_compute.py::test_indexing_empty_shape[1-3]
   
-----------------------------------------------------------------------------------
 live log setup 
------------------------------------------------------------------------------------
   DEBUG    root:conftest.py:213 Setting np/mx/python random seeds to 
1513391544. Use MXNET_TEST_SEED=1513391544 to reproduce.
   
------------------------------------------------------------------------------------
 live log call 
------------------------------------------------------------------------------------
   INFO     root:util.py:85 NumPy-shape semantics has been activated in your 
code. This is required for creating and manipulating scalar and zero-size 
tensors, which were not supported in MXNet before, as in the official NumPy 
library. Please DO NOT manually deactivate this semantics while using 
`mxnet.numpy` and `mxnet.numpy_extension` modules.
   INFO     root:util.py:755 NumPy array semantics has been activated in your 
code. This allows you to use operators from MXNet NumPy and NumPy Extension 
modules as well as MXNet NumPy `ndarray`s.
   PASSED                                                                       
                                                                                
                   [ 33%]
   
../tests/python/unittest/test_deferred_compute.py::test_indexing_empty_shape[2-3]
   
-----------------------------------------------------------------------------------
 live log setup 
------------------------------------------------------------------------------------
   DEBUG    root:conftest.py:213 Setting np/mx/python random seeds to 
662599169. Use MXNET_TEST_SEED=662599169 to reproduce.
   PASSED                                                                       
                                                                                
                   [ 66%]
   
../tests/python/unittest/test_deferred_compute.py::test_indexing_empty_shape[3-3]
   
-----------------------------------------------------------------------------------
 live log setup 
------------------------------------------------------------------------------------
   DEBUG    root:conftest.py:213 Setting np/mx/python random seeds to 
1899500804. Use MXNET_TEST_SEED=1899500804 to reproduce.
   PASSED                                                                       
                                                                                
                   [100%]
   
   
==================================================================================
 3 passed in 0.15s 
==================================================================================
   ```


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to