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

Use tabulate instead of texttable #2574

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

AlexanderDokuchaev
Copy link
Collaborator

Changes

Using tabulate instead of texttable package to create tables.

Reason for changes

Avoid installation two packages to same task.
Tabulate is optional dependencies of pandas package, that used in NNCF. #2542

Related tickets

134603

@AlexanderDokuchaev AlexanderDokuchaev requested a review from a team as a code owner March 13, 2024 20:56
@github-actions github-actions bot added dependencies Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM NNCF PT Pull requests that updates NNCF PyTorch NNCF Common Pull request that updates NNCF Common labels Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.54%. Comparing base (1349247) to head (891fd55).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2574      +/-   ##
===========================================
- Coverage    90.89%   84.54%   -6.35%     
===========================================
  Files          492      492              
  Lines        45101    45096       -5     
===========================================
- Hits         40995    38128    -2867     
- Misses        4106     6968    +2862     
Files Coverage Δ
nncf/common/utils/helpers.py 100.00% <100.00%> (ø)
nncf/torch/pruning/base_algo.py 92.15% <100.00%> (-0.44%) ⬇️
nncf/torch/pruning/filter_pruning/algo.py 96.50% <100.00%> (ø)
setup.py 0.00% <ø> (ø)

... and 56 files with indirect coverage changes

Flag Coverage Δ
COMMON 42.77% <50.00%> (+<0.01%) ⬆️
ONNX 34.66% <36.36%> (+<0.01%) ⬆️
OPENVINO ∅ <ø> (∅)
TENSORFLOW 29.87% <45.45%> (+<0.01%) ⬆️
TORCH 65.76% <100.00%> (-0.01%) ⬇️

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

Components Coverage Δ
common 93.11% <100.00%> (-0.65%) ⬇️
torch 93.59% <100.00%> (-0.01%) ⬇️
tensorflow 93.74% <ø> (ø)
onnx 93.05% <ø> (ø)
openvino 25.58% <ø> (-68.49%) ⬇️
ptq 67.31% <ø> (-20.43%) ⬇️

Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add screenshots before/after?

@AlexanderDokuchaev
Copy link
Collaborator Author

Example of tables:

https://github.com/openvinotoolkit/nncf/tree/develop/examples/quantization_aware_training/torch/resnet18

+------------------+----------+-----------+-------------------------------+
|                  |   FP32   |   INT8    |            Summary            |
+==================+==========+===========+===============================+
| Accuracy@1       | 55.520   | 56.715    | 55.360 (init) + 1.355 (tuned) |
+------------------+----------+-----------+-------------------------------+
| Model Size, Mb   | 43.067   | 10.939    | Compression rate is 3.937     |
+------------------+----------+-----------+-------------------------------+
| Performance, FPS | 3743.990 | 12734.460 | Speedup x3.401                |
+------------------+----------+-----------+-------------------------------+

┍━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
│                  │     FP32 │      INT8 │ Summary                       │
┝━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┥
│ Accuracy@1       │   55.520 │    56.715 │ 55.360 (init) + 1.355 (tuned) │
├──────────────────┼──────────┼───────────┼───────────────────────────────┤
│ Model Size, Mb   │   43.067 │    10.939 │ Compression rate is 3.937     │
├──────────────────┼──────────┼───────────┼───────────────────────────────┤
│ Performance, FPS │ 3743.990 │ 12734.460 │ Speedup x3.401                │
┕━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

https://github.com/openvinotoolkit/nncf/tree/develop/examples/llm_compression/openvino/tiny_llama

+--------------+---------------------------+-----------------------------------+
| Num bits (N) | % all parameters (layers) |    % ratio-defining parameters    |
|              |                           |             (layers)              |
+==============+===========================+===================================+
| 8            | 30% (20 / 156)            | 21% (18 / 154)                    |
+--------------+---------------------------+-----------------------------------+
| 4            | 70% (136 / 156)           | 79% (136 / 154)                   |
+--------------+---------------------------+-----------------------------------+

┍━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
│   Num bits (N) │ % all parameters (layers)   │ % ratio-defining parameters (layers)   │
┝━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┥
│              8 │ 30% (20 / 156)              │ 21% (18 / 154)                         │
├────────────────┼─────────────────────────────┼────────────────────────────────────────┤
│              4 │ 70% (136 / 156)             │ 79% (136 / 154)                        │
┕━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KodiaqQ KodiaqQ merged commit 7898e8c into openvinotoolkit:develop Mar 19, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM NNCF Common Pull request that updates NNCF Common NNCF PT Pull requests that updates NNCF PyTorch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants