Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Good First Issue][NNCF][Tests]: Refactor weights compression tests into a template tests. #3129

Open
daniil-lyakhov opened this issue Dec 3, 2024 · 6 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@daniil-lyakhov
Copy link
Collaborator

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:

  1. Introduce Template tests(class TemplateTestWeightsCompression) for weights compression in the test_weights_compression.py file in this directory: https://github.com/openvinotoolkit/nncf/tree/develop/tests/cross_fw/test_templates
  2. 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 template.
    The template should implement 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

#2856

Resources

Contact points

@daniil-lyakhov

Ticket

No response

@daniil-lyakhov daniil-lyakhov added the good first issue Good for newcomers label Dec 3, 2024
@daniil-lyakhov
Copy link
Collaborator Author

CC: AHB102

@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Dec 4, 2024
@rk119
Copy link
Contributor

rk119 commented Dec 7, 2024

Hi @AHB102,

Are you working on this issue? :)

@AHB102
Copy link

AHB102 commented Dec 7, 2024

@rk119 Yeah.

@rk119
Copy link
Contributor

rk119 commented Dec 7, 2024

@rk119 Yeah.

Alright!

@AHB102
Copy link

AHB102 commented Dec 7, 2024

.take

Copy link

github-actions bot commented Dec 7, 2024

Thank you for looking into this issue! Please let us know if you have any questions or require any help.

@daniil-lyakhov daniil-lyakhov moved this from Contributors Needed to Assigned in Good first issues Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Assigned
Development

No branches or pull requests

3 participants