Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[quantization] unexpected keyword argument 'quantized_dtype' #11770

Closed
christ1ne opened this issue Jul 16, 2018 · 2 comments
Closed

[quantization] unexpected keyword argument 'quantized_dtype' #11770

christ1ne opened this issue Jul 16, 2018 · 2 comments

Comments

@christ1ne
Copy link

christ1ne commented Jul 16, 2018

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.

For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io

Description

unexpected keyword argument 'quantized_dtype'

Environment info (Required)

$ python diagnose.py
----------Python Info----------
('Version :', '2.7.15')
('Compiler :', 'GCC 7.2.0')
('Build :', ('default', 'May 1 2018 23:32:55'))
('Arch :', ('64bit', ''))
------------Pip Info-----------
('Version :', '10.0.1')
('Directory :', '/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/pip')
----------MXNet Info-----------
/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
('Version :', '1.2.0')
('Directory :', '/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/mxnet')
('Commit Hash :', '297c64fd2ee404612aa3ecc880b940fb2538039c')
----------System Info----------
('Platform :', 'Linux-4.13.0-39-generic-x86_64-with-debian-stretch-sid')
('system :', 'Linux')
('node :', 'n')
('release :', '4.13.0-39-generic')
('version :', '#44~16.04.1-Ubuntu SMP Thu Apr 5 16:43:10 UTC 2018')
----------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): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Stepping: 10
CPU MHz: 4397.150
CPU max MHz: 4700.0000
CPU min MHz: 800.0000
BogoMIPS: 7392.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 12288K
NUMA node0 CPU(s): 0-11
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti retpoline intel_pt rsb_ctxsw spec_ctrl tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0010 sec, LOAD: 0.9862 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0448 sec, LOAD: 0.9227 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0655 sec, LOAD: 0.2791 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0528 sec, LOAD: 0.2251 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0615 sec, LOAD: 0.4067 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0744 sec, LOAD: 0.3717 sec.

Package used (Python/R/Scala/Julia):
Python

Build info (Required if built from source)

pip install mxnet-cu92

Compiler (gcc/clang/mingw/visual studio):

MXNet commit hash:
c792c9f

Build config:
(Paste the content of config.mk, or the build command.)

Error Message:

python ./tests/python/quantization/test_quantization.py
/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
....[INFO] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1329424022 to reproduce.
S.....[INFO] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1318831619 to reproduce.
E.[INFO] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=560487696 to reproduce.
E.

ERROR: main.test_quantized_flatten

Traceback (most recent call last):
File "/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/n/GitHub/incubator-mxnet/tests/python/quantization/common.py", line 175, in test_new
orig_test(*args, **kwargs)
File "./tests/python/quantization/test_quantization.py", line 360, in test_quantized_flatten
check_quantized_flatten((10,), qdtype)
File "./tests/python/quantization/test_quantization.py", line 351, in check_quantized_flatten
qoutput, min_output, max_output = mx.nd.contrib.quantized_flatten(qdata, min_data, max_data)
File "", line 37, in quantized_flatten
File "/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/mxnet/_ctypes/ndarray.py", line 92, in _imperative_invoke
ctypes.byref(out_stypes)))
File "/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/mxnet/base.py", line 149, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
MXNetError: Type inconsistent, Provided = uint8, inferred type = int8
-------------------- >> begin captured logging << --------------------
common: INFO: Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1318831619 to reproduce.
--------------------- >> end captured logging << ---------------------

ERROR: main.test_quantize_model

Traceback (most recent call last):
File "/home/n/anaconda3/envs/p27_cu92/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/n/GitHub/incubator-mxnet/tests/python/quantization/common.py", line 175, in test_new
orig_test(*args, **kwargs)
File "./tests/python/quantization/test_quantization.py", line 464, in test_quantize_model
check_quantize_model(qdtype)
File "./tests/python/quantization/test_quantization.py", line 443, in check_quantize_model
calib_mode='none')
TypeError: quantize_model() got an unexpected keyword argument 'quantized_dtype'
-------------------- >> begin captured logging << --------------------
common: INFO: Setting test np/mx/python random seeds, use MXNET_TEST_SEED=560487696 to reproduce.
--------------------- >> end captured logging << ---------------------


Ran 14 tests in 0.024s

FAILED (SKIP=1, errors=2)

Minimum reproducible example

run the test command above

Steps to reproduce

git clone master and run the test command above

What have you tried to solve it?

NA

@OneRaynyDay
Copy link
Contributor

OneRaynyDay commented Jul 16, 2018

You are using mxnet version 1.2.0 while using branch master to run the tests. These two versions have different API's on quantize_model(). Please either run:

pip install mxnet==1.3.0b20180715

and then run the test, or check out the 1.2.0 branch from git before running your test.

Please mark as closed

@christ1ne
Copy link
Author

thanks for the explanation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants