Tiny Llama ONNX llm_compression example missing dependancies
🐛 Describe the bug
When trying to run the example for tiny llama compression with ONNX, the main.py fails with the following error:
RuntimeError: Failed to import optimum.onnxruntime.modeling_decoder because of the following error (look up to see its traceback):
No module named 'onnxruntime'
pip installing onnxrutime solves the issue, but this implies that onnxruntime should be added to the requirements.txt file.
Environment
Tested on Windows 11, Core Ultra Series 2 288V Python 3.12.10 pip freeze output (before installing onnxruntime manually): about-time==4.2.1 aiohappyeyeballs==2.6.1 aiohttp==3.12.13 aiosignal==1.3.2 alive-progress==3.2.0 attrs==25.3.0 autograd==1.8.0 certifi==2025.6.15 charset-normalizer==3.4.2 cma==4.2.0 colorama==0.4.6 contourpy==1.3.2 cycler==0.12.1 datasets==3.6.0 Deprecated==1.2.18 dill==0.3.8 filelock==3.18.0 fonttools==4.58.4 frozenlist==1.7.0 fsspec==2025.3.0 grapheme==0.6.0 huggingface-hub==0.33.1 idna==3.10 Jinja2==3.1.6 joblib==1.5.1 jsonschema==4.24.0 jsonschema-specifications==2025.4.1 kiwisolver==1.4.8 markdown-it-py==3.0.0 MarkupSafe==3.0.2 matplotlib==3.10.3 mdurl==0.1.2 mpmath==1.3.0 multidict==6.5.1 multiprocess==0.70.16 natsort==8.4.0 networkx==3.4.2 ninja==1.11.1.4 nncf==2.17.0 numpy==2.2.6 onnx==1.17.0 openvino==2025.2.0 openvino-telemetry==2025.1.0 openvino-tokenizers==2025.2.0.0 optimum==1.25.3 optimum-intel==1.23.1 packaging==25.0 pandas==2.2.3 pillow==11.2.1 propcache==0.3.2 protobuf==6.31.1 psutil==7.0.0 pyarrow==20.0.0 pydot==3.0.4 Pygments==2.19.2 pymoo==0.6.1.5 pyparsing==3.2.3 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==6.0.2 referencing==0.36.2 regex==2024.11.6 requests==2.32.4 rich==14.0.0 rpds-py==0.25.1 safetensors==0.5.3 scikit-learn==1.7.0 scipy==1.16.0 setuptools==80.9.0 six==1.17.0 sympy==1.14.0 tabulate==0.9.0 threadpoolctl==3.6.0 tokenizers==0.21.2 torch==2.7.1 tqdm==4.67.1 transformers==4.51.3 typing_extensions==4.14.0 tzdata==2025.2 urllib3==2.5.0 wrapt==1.17.2 xxhash==3.5.0 yarl==1.20.1
Minimal Reproducible Example
python -m venv nncf.env
nncf_env\scripts\activate
python -m pip install -U pip
pip install -r requirements.txt
pip install ../../../../
python main.py
Are you going to submit a PR?
- [ ] Yes I'd like to help by submitting a PR!
@andrey-churkin , please take a look.
Fixed https://github.com/openvinotoolkit/nncf/pull/3565