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

Add logs for user guiding better #2523

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

UsingtcNower
Copy link
Contributor

Changes

Reason for changes

Related tickets

Tests

@UsingtcNower UsingtcNower requested a review from a team as a code owner February 27, 2024 14:04
@github-actions github-actions bot added the NNCF PT Pull requests that updates NNCF PyTorch label Feb 27, 2024
@daniil-lyakhov
Copy link
Collaborator

daniil-lyakhov commented Feb 27, 2024

Greetings, @UsingtcNower! Thank you for your interest in the NNCF Filter Pruning algorithm!

I've checked your changes, and it looks like this warning is ambiguous: this information is present in the pruning statistics. Please check the filter pruning statistics for identity pruning masks and confirm it shows that pruning masks are identity.

In case you are using pruning algorithm in your custom pipeline, you can print statistics using following code:

compression_ctrl, compressed_model = create_compressed_model(...)
statistics = compression_ctrl.statistics()
print(statistics.to_str())

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.63%. Comparing base (6afe8d4) to head (0c3455c).
Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #2523       +/-   ##
============================================
+ Coverage    46.73%   84.63%   +37.90%     
============================================
  Files          498      498               
  Lines        46178    45540      -638     
============================================
+ Hits         21579    38541    +16962     
+ Misses       24599     6999    -17600     
Files Coverage Δ
nncf/torch/pruning/filter_pruning/algo.py 96.50% <100.00%> (+67.35%) ⬆️

... and 350 files with indirect coverage changes

Flag Coverage Δ
COMMON 42.73% <ø> (-0.01%) ⬇️
ONNX 34.78% <0.00%> (-0.01%) ⬇️
OPENVINO ?
TENSORFLOW 29.65% <0.00%> (?)
TORCH 66.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
common 93.10% <ø> (+23.64%) ⬆️
torch 93.42% <100.00%> (+60.06%) ⬆️
tensorflow 93.96% <ø> (+93.96%) ⬆️
onnx 93.05% <ø> (ø)
openvino 25.58% <ø> (-68.48%) ⬇️
ptq 67.30% <ø> (-9.99%) ⬇️

@UsingtcNower
Copy link
Contributor Author

Greetings @UsingtcNower! Thank you for your interest in the NNCF Filter Pruning algorithm!

I've checked your changes, and it looks like this warning is ambiguous: this information is present in the pruning statistics. Please check the filter pruning statistics for identity pruning masks and confirm it shows that pruning masks are identity.

Thanks for your reply @daniil-lyakhov !
Let me illustrate what I'm going through, the printed filter pruning statistics show that Pruning Level is zero, but I can't tell why. The filter pruning statistics looks like a summary, and the warning here looks like a check. Hopefully it can help users like me.

In case you are using pruning algorithm in your custom pipeline, you can print statistics using following code:

compression_ctrl, compressed_model = create_compressed_model(...)
statistics = compression_ctrl.statistics()
print(statistics.to_str())

@daniil-lyakhov
Copy link
Collaborator

@UsingtcNower, could you please attach NNCF logs with this warning turned on?

@UsingtcNower
Copy link
Contributor Author

UsingtcNower commented Feb 28, 2024

@UsingtcNower, could you please attach NNCF logs with this warning turned on?

@daniil-lyakhov , sure! Here I attach the NNCF logs.
nncf_logs.log

@alexsu52
Copy link
Contributor

alexsu52 commented Mar 1, 2024

@UsingtcNower Thanks for the contribution!

@alexsu52 alexsu52 merged commit 118e8a5 into openvinotoolkit:develop Mar 1, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF PT Pull requests that updates NNCF PyTorch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants