[Good First Issue][NNCF][Tests]: Refactor weights compression tests into a template tests.
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
CC: AHB102
Hi @AHB102,
Are you working on this issue? :)
@rk119 Yeah.
@rk119 Yeah.
Alright!
.take
Thank you for looking into this issue! Please let us know if you have any questions or require any help.
Hi @AHB102,
Are you still working on this issue?
@rk119 I've started on this, but I'm tied up with other things at the moment. Could you please take care of this? Sorry for the inconvenience.
@AHB102 it's alright. I presume that this issue is complete in another PR already :)
@AHB102 it's alright. I presume that this issue is complete in another PR already :)
@AHB102 @rk119 #3179 doesn't resolve the issue completely. There are still duplicated tests to make template ones.
@ljaljushkin Okay then, I would like to work on this issue as well :) if it's alright
@rk119 I've started on this, but I'm tied up with other things at the moment. Could you please take care of this? Sorry for the inconvenience.
@AHB102 can I reassign it to @rk119 then?
@ljaljushkin @rk119 @AHB102 May I help out on this issue?
@ljaljushkin @rk119 @AHB102 May I help out on this issue?
@shumaari I'm afraid not, issue is quite straightforward for splitting. Feel free to take brand-new GFI https://github.com/openvinotoolkit/nncf/issues/3249
@ljaljushkin thank you, will take #3249 instead.
Let's unassign that task due to current assignee's inactivity.
@ljaljushkin Feel free to leave this issue open to other potential contributors as I have other commitments to attend to presently :)
.take
Thank you for looking into this issue! Please let us know if you have any questions or require any help.
Hi @ljaljushkin @alexsu52 I have started working on the problem and have prepared a starting version of the template can you please have a look and check if I'm going in the right direction.
Link to changes: https://github.com/openvinotoolkit/nncf/compare/develop...raghavx1:nncf:develop
Thank You Raghav Sharma
Hi @ljaljushkin @alexsu52 I have started working on the problem and have prepared a starting version of the template can you please have a look and check if I'm going in the right direction.
Link to changes: develop...raghavx1:nncf:develop
Thank You Raghav Sharma
+ @daniil-lyakhov
hi @daniil-lyakhov
Hello, @raghavx1! Sorry for a long delay. I've updated the description to reflect the latest changes in the code base.