vitobellini opened a new issue, #21053:
URL: https://github.com/apache/incubator-mxnet/issues/21053

   Hello,
   I noticed that MXNet comes with a fixed state for Random Number Generator.
   Performing random sampling I obtain the same sequences of numbers every time 
I restart the kernel.
   
   ```
   from mxnet import nd
   for _ in range(3):
       print(nd.random.uniform(0, 1).asscalar())
   ```
   How to reproduce:
   
   - Run the code
   - Restart the kernel
   - Repeat
   I get every time the same sequence:
   
   - 0.5488135
   - 0.5928446
   - 0.71518934
   Note: I have not fixed the random seed.
   Note: Even on different platform I get the same sequence of numbers.
   
   Other libraries like numpy behave differently, I get different random 
numbers every time I restart the kernel.
   
   Is this an expected behaviour? If yes, what is the reason behind this?
   
   Why this is a problem? Because as a user of MXNet if someone does not know 
about this behaviour, then the risk is to end up in deterministic scenarios for 
algorithms or evaluations, where this behaviour is not expected.
   ```
   # curl --retry 10 -s 
https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | 
python
   ----------Python Info----------
   Version      : 3.7.10
   Compiler     : GCC 5.4.0 20160609
   Build        : ('default', 'Dec  1 2021 23:14:01')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 21.3.1
   Directory    : /usr/local/lib/python3.7/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.8.0
   Directory    : /usr/local/lib/python3.7/site-packages/mxnet
   Num GPUs     : 0
   Commit Hash   : e34390235c5b95fd37db1ffb0e211be93b72857a
   ----------System Info----------
   Platform     : 
Linux-4.14.276-211.499.amzn2.x86_64-x86_64-with-debian-stretch-sid
   system       : Linux
   node         : 
mxnet-1-8-cpu-py37-ub-ml-t3-medium-e1a0ef98c4048b78b93bd886cfb4
   release      : 4.14.276-211.499.amzn2.x86_64
   version      : #1 SMP Wed Apr 27 21:08:48 UTC 2022
   ----------Hardware Info----------
   machine      : x86_64
   processor    : x86_64
   Architecture:          x86_64
   CPU op-mode(s):        32-bit, 64-bit
   Byte Order:            Little Endian
   CPU(s):                2
   On-line CPU(s) list:   0,1
   Thread(s) per core:    2
   Core(s) per socket:    1
   Socket(s):             1
   NUMA node(s):          1
   Vendor ID:             GenuineIntel
   CPU family:            6
   Model:                 85
   Model name:            Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
   Stepping:              7
   CPU MHz:               2500.004
   BogoMIPS:              5000.00
   Hypervisor vendor:     KVM
   Virtualization type:   full
   L1d cache:             32K
   L1i cache:             32K
   L2 cache:              1024K
   L3 cache:              36608K
   NUMA node0 CPU(s):     0,1
   Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm 
constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni 
pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt 
tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 
3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms 
invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw 
avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0017 
sec, LOAD: 0.5205 sec.
   Timing for GluonNLP GitHub: https://github.com/dmlc/gluon-nlp, DNS: 0.0016 
sec, LOAD: 0.5493 sec.
   Timing for GluonNLP: http://gluon-nlp.mxnet.io, DNS: 0.0414 sec, LOAD: 
0.1936 sec.
   Timing for D2L: http://d2l.ai, DNS: 0.0116 sec, LOAD: 0.0047 sec.
   Timing for D2L (zh-cn): http://zh.d2l.ai, DNS: 0.0151 sec, LOAD: 0.2168 sec.
   Timing for FashionMNIST: 
https://repo.mxnet.io/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, 
DNS: 0.0361 sec, LOAD: 0.0466 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0022 sec, LOAD: 
0.3712 sec.
   Error open Conda: https://repo.continuum.io/pkgs/free/, HTTP Error 403: 
Forbidden, DNS finished in 0.0018382072448730469 sec.
   ```
   
   ```
   # python -c "from mxnet.runtime import Features; print(Features())"
   [✖ CUDA, ✖ CUDNN, ✖ NCCL, ✖ CUDA_RTC, ✖ TENSORRT, ✔ CPU_SSE, ✔ CPU_SSE2, ✔ 
CPU_SSE3, ✖ CPU_SSE4_1, ✖ CPU_SSE4_2, ✖ CPU_SSE4A, ✖ CPU_AVX, ✖ CPU_AVX2, ✔ 
OPENMP, ✖ SSE, ✖ F16C, ✖ JEMALLOC, ✔ BLAS_OPEN, ✖ BLAS_ATLAS, ✖ BLAS_MKL, ✖ 
BLAS_APPLE, ✔ LAPACK, ✔ MKLDNN, ✔ OPENCV, ✖ CAFFE, ✖ PROFILER, ✔ DIST_KVSTORE, 
✖ CXX14, ✖ INT64_TENSOR_SIZE, ✔ SIGNAL_HANDLER, ✖ DEBUG, ✖ TVM_OP]
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

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