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]: [TorchFX] Test PTQ MinMax parameters #2873

Closed
daniil-lyakhov opened this issue Aug 6, 2024 · 15 comments
Closed

[Good First Issue][NNCF]: [TorchFX] Test PTQ MinMax parameters #2873

daniil-lyakhov opened this issue Aug 6, 2024 · 15 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@daniil-lyakhov
Copy link
Collaborator

daniil-lyakhov commented Aug 6, 2024

Greetings🐱! As a part of #2766 TorchFX PTQ backend support, we are gladly presenting to you following issue:

Implement TemplateTestPTQParams, TemplateTestQuantizerConfig as it done for other backends(example: https://github.com/openvinotoolkit/nncf/blob/develop/tests/torch/ptq/test_ptq_params.py)

Example Pull Requests

#2856

Resources

Contact points

@daniil-lyakhov

Ticket

#2766

@daniil-lyakhov daniil-lyakhov added the good first issue Good for newcomers label Aug 6, 2024
@daniil-lyakhov daniil-lyakhov changed the title [Good First Issue][NNCF]: [TorchFX] [Good First Issue][NNCF]: [TorchFX] Test PTQ MinMax parameters Aug 6, 2024
@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Aug 6, 2024
@rk119
Copy link
Contributor

rk119 commented Aug 7, 2024

.take

Copy link

github-actions bot commented Aug 7, 2024

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

@alexsu52 alexsu52 moved this from Contributors Needed to Assigned in Good first issues Aug 8, 2024
@daniil-lyakhov
Copy link
Collaborator Author

Hi, @rk119 , do you still plan to contribute?

@rk119
Copy link
Contributor

rk119 commented Aug 22, 2024

Hi, @rk119 , do you still plan to contribute?

Yes. I do.

@mlukasze
Copy link

@rk119 do you need any help with task? do not hesitate to ask :)

@rk119
Copy link
Contributor

rk119 commented Sep 18, 2024

@rk119 do you need any help with task? do not hesitate to ask :)

Hi @mlukasze, I will try to look into this issue over the weekend as I am still eager to continue. If I fail to do so due to lack of availability, then I will unassign myself. I hope it is alright to do so? :)

@mlukasze
Copy link

if you want to continue we can wait for you, thanks :)

@rk119
Copy link
Contributor

rk119 commented Sep 19, 2024

if you want to continue we can wait for you, thanks :)

Oh alright, thank you so much!

@rk119
Copy link
Contributor

rk119 commented Sep 23, 2024

Hi @daniil-lyakhov,

I am facing an issue trying to implement test_unified_scales_command_creation . I am unable to verify and access the quantizer parameters in check_unified_scale_layout, since the create_unified_scales_quantizers_insertion_commands in Torch FX backend returns transformations with only params priority and transformation_fn. I would appreciate some guidance in this. Thank you!

@daniil-lyakhov
Copy link
Collaborator Author

daniil-lyakhov commented Sep 24, 2024

Hi @rk119, please use the __closure__ attribute of the transformation_fn callable object, it will return cells for each captured value. To access cells value please use cell_contents attribute.
Ref: https://docs.python.org/3/reference/datamodel.html#special-read-only-attributes
https://stackoverflow.com/a/55320885/9183892

@rk119
Copy link
Contributor

rk119 commented Sep 24, 2024

Hi @rk119, please use the __closure__ attribute of the transformation_fn callable object, it will return cells for each captured value. To access cells value please use cell_contents attribute. Ref: https://docs.python.org/3/reference/datamodel.html#special-read-only-attributes https://stackoverflow.com/a/55320885/9183892

Ah yes! Thank you. :)

@rk119
Copy link
Contributor

rk119 commented Sep 25, 2024

Hi @daniil-lyakhov,

I noticed that in the example reference test for this issue, the test_range_estimator_per_channel parameter in the test_params is defined but not used anywhere in the test cases in TemplateTestPTQParams or I could be mistaken. How would you suggest I address this?

@daniil-lyakhov
Copy link
Collaborator Author

Hi @rk119, please just skip this key in the FX tests implementation and keep other tests as it is

@rk119
Copy link
Contributor

rk119 commented Sep 25, 2024

Hi @daniil-lyakhov, I opened a PR #2989 for this issue.

@mlukasze mlukasze moved this from Assigned to In Review in Good first issues Sep 25, 2024
alexsu52 pushed a commit that referenced this issue Sep 25, 2024
### Changes

New test file added in tests/torch/fx. Implemented TemplateTestPTQParams
for PTQ MinMax for TorchFX backend.

### Related tickets

#2873
@alexsu52
Copy link
Contributor

@rk119, thanks for the contribution!

@github-project-automation github-project-automation bot moved this from In Review to Closed in Good first issues Sep 25, 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
Archived in project
Development

No branches or pull requests

4 participants