open-mmlab / mmrazor

OpenMMLab Model Compression Toolbox and Benchmark.
https://mmrazor.readthedocs.io/en/latest/
Apache License 2.0
1.44k stars 226 forks source link

Failed to run ./tools/ptq.py #549

Open zp2459 opened 1 year ago

zp2459 commented 1 year ago

When I runned the ptq.py, Unfortunately It threw an error, and the error message is as follows. The reason for the error is most likely the absence of the mmcls installation: 1686017167435 So I installed the mmcls through the pypi: pip install mmcls but it version(0.25.0) is incompatible. Then I install from source, I use the command below : git clone -b 1.x https://github.com/open-mmlab/mmclassification.git cd mmclassification/ mim install -e .

it still thew a error: 1686017500925 How can I solve it?

and my conda env is below:

addict 2.4.0 aenum 3.1.12 brotlipy 0.7.0 certifi 2023.5.7 cffi 1.15.1 charset-normalizer 2.0.4 click 8.1.3 colorama 0.4.6 contourpy 1.0.7 cryptography 39.0.1 cycler 0.11.0 dill 0.3.6 einops 0.6.1 filelock 3.9.0 fonttools 4.39.4 gmpy2 2.1.2 grpcio 1.54.2 idna 3.4 importlib-metadata 6.6.0 importlib-resources 5.12.0 Jinja2 3.1.2 joblib 1.2.0 kiwisolver 1.4.4 Markdown 3.4.3 markdown-it-py 2.2.0 MarkupSafe 2.1.1 mat4py 0.5.0 matplotlib 3.7.1 mdurl 0.1.2 mkl-fft 1.3.6 mkl-random 1.2.2 mkl-service 2.4.0 mmcls 1.0.0rc6 /home/panz/project/mmrazor/mmclassification mmcv 2.0.0 mmdeploy 1.1.0 mmengine 0.7.4 mmrazor 1.0.0 /home/panz/project/mmrazor model-index 0.1.11 modelindex 0.0.2 mpmath 1.2.1 multiprocess 0.70.14 networkx 2.8.4 numpy 1.24.3 onnx 1.14.0 opencv-python 4.7.0.72 openmim 0.3.7 ordered-set 4.1.0 packaging 23.1 pandas 2.0.2 Pillow 9.4.0 pip 23.0.1 prettytable 3.7.0 protobuf 3.20.2 pycparser 2.21 Pygments 2.15.1 pyOpenSSL 23.0.0 pyparsing 3.0.9 PySocks 1.7.1 python-dateutil 2.8.2 pytz 2023.3 PyYAML 6.0 requests 2.29.0 rich 13.4.1 setuptools 67.8.0 six 1.16.0 sympy 1.11.1 tabulate 0.9.0 termcolor 2.3.0 terminaltables 3.1.10 tomli 2.0.1 torch 2.0.1 torchvision 0.15.2 typing_extensions 4.5.0 tzdata 2023.3 urllib3 1.26.15 wcwidth 0.2.6 wheel 0.38.4 yapf 0.33.0 zipp 3.15.0

zp2459 commented 1 year ago

I have solved it. PLS check your mmdeploy version acorrding to the table. Furthermore, preparing the dataset according to the instructions