openvinotoolkit / openvinotoolkit/nncf
[Good First Issue][NNCF][Tests]: Refactor weights compression tests into a template tests.
@raghavx1 is already working on this.
Since Mar 20, 2025.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 305
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 27
Description
Context
Majority of the NNCF PTQ tests are using templates: for example tests for Fast Bias Correction or MinMax algorithm.
The structure is following: there is a template file like this, and each backend implements abstract methods of the template file like this.
What needs to be done?
The task is to:
To extend the TemplateWeightCompression class and Refactor this files
** https://github.com/openvinotoolkit/nncf/blob/develop/tests/torch/ptq/test_weights_compression.py
** https://github.com/openvinotoolkit/nncf/blob/develop/tests/torch/fx/test_compress_weights.py
to implement the following common tests:
- test_compress_weights
- test_compress_shared_weights / test_compress_weights_shared_weights
- test_compress_weights_functional_model / test_compress_weights_functional_model
- test_raise_error_with_unsupported_params_for_int8
- test_raise_error_with_unsupported_params_for_int4
- test_raise_error_with_not_int8
- test_raise_error_for_statistics_caching
- test_get_dtype_attribute_of_parameter
- test_model_devices_and_precisions
Please use this two template files as a reference:
https://github.com/openvinotoolkit/nncf/blob/develop/tests/torch/fx/test_fast_bias_correction.py
https://github.com/openvinotoolkit/nncf/blob/develop/tests/torch/ptq/test_fast_bias_correction.py
Example Pull Requests
https://github.com/openvinotoolkit/nncf/pull/2856
Resources
- Contribution guide - start here!
- Intel DevHub Discord channel - engage in discussions, ask questions and talk to OpenVINO developers
- How to link your Pull Request to an issue
Contact points
@daniil-lyakhov
Ticket
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.