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

Remove pylint #2205

Merged
merged 3 commits into from
Oct 27, 2023
Merged

Remove pylint #2205

merged 3 commits into from
Oct 27, 2023

Conversation

vshampor
Copy link
Contributor

Changes

Pylint was removed from the make targets and from code. Added .pylintrc to .gitignore so that developers could have their own .pylintrc if they still want to use pylint in informational capacity locally.

Reason for changes

Following through with the decision to use ruff as the main linter. Most of the pylint rules not covered by ruff will be covered by mypy in the future.

Related tickets

N/A

Tests

Existing test scope

@vshampor vshampor requested a review from a team as a code owner October 18, 2023 11:12
@github-actions github-actions bot added documentation Improvements or additions to documentation NNCF TF Pull requests that updates NNCF TensorFlow NNCF PT Pull requests that updates NNCF PyTorch NNCF Common Pull request that updates NNCF Common experimental NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF ONNX Pull requests that updates NNCF ONNX NNCF PTQ Pull requests that updates NNCF PTQ labels Oct 18, 2023
@vshampor vshampor force-pushed the remove_pylint branch 2 times, most recently from e1b351c to f5c01d4 Compare October 23, 2023 10:08
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #2205 (353fd1c) into develop (218cb6b) will increase coverage by 0.00%.
The diff coverage is 25.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2205   +/-   ##
========================================
  Coverage    36.40%   36.40%           
========================================
  Files          486      486           
  Lines        43500    43469   -31     
========================================
- Hits         15835    15827    -8     
+ Misses       27665    27642   -23     
Files Coverage Δ
nncf/__init__.py 100.00% <100.00%> (ø)
nncf/common/graph/graph.py 74.92% <ø> (ø)
nncf/common/hardware/config.py 93.16% <ø> (ø)
nncf/common/insertion_point_graph.py 95.02% <ø> (ø)
nncf/common/logging/track_progress.py 87.93% <100.00%> (ø)
nncf/common/pruning/node_selector.py 0.00% <ø> (ø)
...common/quantization/quantizer_propagation/graph.py 84.53% <ø> (ø)
nncf/common/utils/logger/__init__.py 0.00% <ø> (ø)
nncf/common/utils/patcher.py 70.77% <100.00%> (ø)
nncf/experimental/tensor/functions.py 99.24% <100.00%> (ø)
... and 88 more

... and 5 files with indirect coverage changes

.gitignore Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
docs/styleguide/PyGuide.md Show resolved Hide resolved
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

@vshampor vshampor merged commit da16069 into openvinotoolkit:develop Oct 27, 2023
6 checks passed
ksilligan added a commit to ksilligan/nncf that referenced this pull request Nov 6, 2023
* Bump `numpy` version upper bound (openvinotoolkit#2202)

### Changes

Bump `numpy` version.

### Reason for changes

Current version causes issues in OpenVINO CI: https://github.com/intel-innersource/frameworks.ai.openvino.ci.product-configs/pull/2803

### Related tickets

122802

* Add links to OneFormer and InstructPix2Pix notebooks (openvinotoolkit#2201)

### Changes

Added links to `OneFormer` and `InstructPix2Pix` OpenVINO notebooks

* Added documentation for NF4 mode (openvinotoolkit#2194)

Co-authored-by: Alexander Kozlov <[email protected]>

* [Torch] SE block HW fusing pattern is presented (openvinotoolkit#2177)

### Changes

* SE block ignored pattern is presented for Torch backend

![image](https://github.com/openvinotoolkit/nncf/assets/74656388/2bbf0d3c-ac9d-4db0-9c28-ff6b1bf299af)
* SE block ignored pattern for OV backend is adjusted
* NON_PATTERN_NODE_WITH_TYPE is introduced in the graph matcher


### Reason for changes

To align FQ layout between TORCH and OV backend for efficientnet_b0
model
To fix FQ placement for SE block:
Before: 

![image](https://github.com/openvinotoolkit/nncf/assets/74656388/7e8b27a3-fafc-41f9-ace2-1945bce32b65)
After:

![image](https://github.com/openvinotoolkit/nncf/assets/74656388/e4479c90-bd4f-47fb-b2c2-acd76a685030)


### Related tickets

121647

### Tests
* test_non_pattern_node_with_type for the graph matcher

Post training quantization manual build 180

| Model | Backend | Metric name | Metric value | Metric diff | Num FQ |
RAM MiB | Quant. time | Total time | Status |

|-------|----------------------|-------------|--------------|-------------|---------|---------|-------------|------------|---------|
| 1 | timm/efficientnet_b0 | OV | Acc@1 | 0.7688 | -0.0042 | 92 | 1033 |
0:00:25 | 1:03:58 | |
| 2 | timm/efficientnet_b0 | TORCH | Acc@1 | 0.7680 | -0.0049 | 92 | 892
| 0:00:48 | 1:04:27 |


* pattern manager tests

* [PTQ][Torch][KQV self attention] Align FQ placement between OV and Torch backend (openvinotoolkit#2166)

### Changes

* "unbing" and "__matmul__" ops are added to torch patterns
* Dropout removing pass is added to function
`transform_to_inference_graph`
* LayerNorm and GroupNorm metatypes are added to ignored metatypes in
MinMax algorithm

### Reason for changes

To align quantization placement between OV and Torch backends for the
following models:
* timm/crossvit_9_240
* timm/deit3_small_patch16_224
* timm/swin_base_patch4_window7_224


### Related tickets

121647

### Tests
*  test_metatypes_to_ignore for quantization propagation solver

* Added ov_version parameter to the env tests (openvinotoolkit#2209)

### Changes

- Added `ov_version` variable for the pytest in `test_examples`;
- Added `ov_version` variable for the pytest in the `test_install_*`;

### Reason for changes

- More flexible tests

### Related tickets

- 122860

### Tests

- Updated

* Do not test common code in backend-specific test targets (openvinotoolkit#2212)

### Changes
As stated in the title

### Reason for changes
Common code has an own target now which is run using GH actions, no reason to run these tests additionally in the backend-specific targets.

### Related tickets
TBA

### Tests
Existing precommit scope

* Enable SmoothQuant only for OV backend (openvinotoolkit#2208)

### Changes

Run the SmoothQuant and ChannelAlignment algorithms only for the
OpenVINO backend.

### Reason for changes

Only the OpenVINO backend supports SmoothQuant and ChannelAlignment
algorithms.

### Related tickets
N/A

### Tests
N/A

* [OV] Add caching of OMZ models (openvinotoolkit#2214)

### Changes

Added cache_dir for OMZ models

### Reason for changes

* Сhanges made according to the requirements of the validation team

### Related tickets

<!--- Post the numerical ID of the ticket, if available -->

### Tests

<!--- How was the correctness of changes tested and whether new tests
were added -->

* QuantizationPreset.MIXED for ModelType.TRANSFORMER by default (openvinotoolkit#2216)

### Changes

Made the QuantizationPreset.MIXED preset for ModelType.TRANSFORMER by
default.

### Reason for changes

Quantization of transformer-based models with QuantizationPreset.MIXED
preset shows the best accuracy w/o performance degradation.

### Related tickets

ref: 123235

### Tests
test_create_nncf_config
test_quantization_preset

* Updated reference for 2023.2.0-12979-04c766e9f17 (openvinotoolkit#2219)

- [ ] pass nncf + openvino-nightly tests - build#7

### Changes

<!--- What was changed (briefly), how to reproduce (if applicable), what
the reviewers should focus on -->

### Reason for changes

<!--- Why should the change be applied -->

### Related tickets

<!--- Post the numerical ID of the ticket, if available -->

### Tests

<!--- How was the correctness of changes tested and whether new tests
were added -->

* Using ov.save_model(...) in PTQ examples (openvinotoolkit#2156)

### Changes

Using ov.save_model(...) in PTQ examples

### Reason for changes

ov.save_model(...) is introduced in OpenVINO==2023.1.0

### Related tickets

N/A

### Tests

examples

* [PTQ] Remove insert_null_biases pass (openvinotoolkit#2217)

### Changes

- Removed `insert_bull_biases` method

### Reason for changes

- Inserting is not necessary since correcting the null biases is limited
by magnitude.
- Inserting of the new increases binary file size.

### Related tickets

- 120843

* Fix index out of range (openvinotoolkit#2224)

### Changes

Fix index out of range

### Reason for changes

File "nncf/nncf/quantization/algorithms/pipeline.py", line 119, in
run_step
current_model = pipeline_step[-1].apply(current_model, current_graph,
step_statistics)
IndexError: list index out of range

### Related tickets

N/A

### Tests

N/A

* Added `keepdims` argument for min,max functions (openvinotoolkit#2225)

### Changes

as stated in the title

### Reason for changes

Follow-up from comment
openvinotoolkit#2218 (comment)

### Related tickets

n/a

### Tests

test_fn_max
test_fn_min
test_max
test_min

* [PTQ] Avg pool is added as ignored metatype for TRANSFORMER model_type (openvinotoolkit#2228)

### Changes

[PTQ] Avg pool is added as ignored metatype for TRANSFORMER model_type
in TORCH/OV/ONNX backends

### Reason for changes

* To align PTQ backends as for example TORCH avg_pool is mapping to
reduce_mean in OV, for timm/visformer_small in particular

### Related tickets

110985
119910

### Tests

* Remove pylint (openvinotoolkit#2205)

### Changes
Pylint was removed from the make targets and from code. Added `.pylintrc` to `.gitignore` so that developers could have their own `.pylintrc` if they still want to use pylint in informational capacity locally.

### Reason for changes
Following through with the decision to use ruff as the main linter. Most of the pylint rules not covered by ruff will be covered by mypy in the future.

### Related tickets
N/A

### Tests
Existing test scope

* Use torch 2.1 and remove torch 1.13 (openvinotoolkit#2211)

### Changes
As stated in the title

### Reason for changes
Keeping up with the latest torch version

### Related tickets
N/A

### Tests
Existing torch test scope

* [Graph visualization] Reserved dot symbols are replaced for each graph visualization (openvinotoolkit#2231)

### Changes

Visualization of debug graph is fixed by replacing : to ^

### Reason for changes

To fix graph visualization for OV backend

### Related tickets


### Tests

* [ONNX][OV] Update SE block pattern (openvinotoolkit#2229)

### Changes

Add SE block ignored pattern for ONNX;

![image](https://github.com/openvinotoolkit/nncf/assets/32935044/edd1d9ad-3eb5-4f73-bc94-021c465b345a)

Add hsigmoid to OV SE block pattern

OV new quantization scheme for mobilentv3

![image](https://github.com/openvinotoolkit/nncf/assets/32935044/d089fda8-54c9-400f-9720-4957d2f077d5)
ONNX efficientnet-b0:

![image](https://github.com/openvinotoolkit/nncf/assets/32935044/c673cf55-03bb-49b0-971a-00c0e8e39420)
ONNX mobilentv3:

![image](https://github.com/openvinotoolkit/nncf/assets/32935044/e0dec26e-8607-4a2c-b889-7e250decb253)


### Reason for changes

Improve accuracy metrics for modes with SE block

### Related tickets

123692
123691

### Tests

Models from conformance test are tested manually

* Fix github actions codecov uploader for ONNX

* Fix github actions codecov uploader for ONNX and COMMON

* Update upload_coverage_for_develop.yml

---------

Co-authored-by: Przemyslaw Wysocki <[email protected]>
Co-authored-by: Liubov Talamanova <[email protected]>
Co-authored-by: Lyalyushkin Nikolay <[email protected]>
Co-authored-by: Alexander Kozlov <[email protected]>
Co-authored-by: Daniil Lyakhov <[email protected]>
Co-authored-by: Nikita Malinin <[email protected]>
Co-authored-by: Vasily Shamporov <[email protected]>
Co-authored-by: Andrey Churkin <[email protected]>
Co-authored-by: Alexander Suslov <[email protected]>
Co-authored-by: Aleksei Kashapov <[email protected]>
@vshampor vshampor deleted the remove_pylint branch January 9, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation experimental NNCF Common Pull request that updates NNCF Common NNCF ONNX Pull requests that updates NNCF ONNX NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF PT Pull requests that updates NNCF PyTorch NNCF PTQ Pull requests that updates NNCF PTQ NNCF TF Pull requests that updates NNCF TensorFlow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants