Skip to content

Commit 6f5510f

Browse files
committed
Release v2.4.0 of NNCF to master
1 parent 4916668 commit 6f5510f

File tree

1,808 files changed

+547261
-78364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,808 files changed

+547261
-78364
lines changed

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.git/
2+
3+
build
4+
dist
5+
*.egg-info
6+
*.egg/
7+
*.pyc
8+
*.swp
9+
10+
.tox
11+
.coverage
12+
__pycache__

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.png filter=lfs diff=lfs merge=lfs -text
22
*.jpg filter=lfs diff=lfs merge=lfs -text
33
*.pb filter=lfs diff=lfs merge=lfs -text
4+
*.onnx filter=lfs diff=lfs merge=lfs -text
45

56
* text=auto eol=lf
67
*.{tfrecord,h5} binary

.github/issue_template.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!-- Before creating an issue or a discussion topic, check the FAQ at https://github.com/openvinotoolkit/nncf/tree/develop/docs/FAQ.md -->
2+
<!-- If you have a question on how NNCF works or how to apply it to your model, *do not create an issue* - create a discussion at https://github.com/openvinotoolkit/nncf/discussions instead. -->
3+
<!-- Only create an issue for genuine problems with NNCF itself. Provide all necessary info, files and logs for us to be able to reproduce and analyze the issue. -->

.github/labeler.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,35 @@
33
dependencies:
44
- 'requirements.txt'
55
- '**/setup.py'
6+
7+
NNCF PT:
8+
- 'examples/torch/**/*'
9+
- 'nncf/torch/**/*'
10+
- 'tests/torch/**/*'
11+
12+
NNCF TF:
13+
- 'examples/tensorflow/**/*'
14+
- 'nncf/tensorflow/**/*'
15+
- 'tests/tensorflow/**/*'
16+
17+
NNCF ONNX:
18+
- 'examples/onnx/**/*'
19+
- 'nncf/onxx/**/*'
20+
- 'tests/onnx/**/*'
21+
22+
NNCF OpenVINO:
23+
- 'examples/openvino/**/*'
24+
- 'nncf/openvino/**/*'
25+
- 'tests/openvino/**/*'
26+
27+
documentation:
28+
- '**/README.md'
29+
- 'docs/**/*'
30+
31+
experimental:
32+
- 'nncf/experimental/**/*'
33+
34+
NNCF Common:
35+
- 'examples/common/**/*'
36+
- 'nncf/common/**/*'
37+
- 'tests/common/**/*'
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Config schema HTML build
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- test_for_doc_build_trigger
7+
paths:
8+
- nncf/config/**
9+
permissions:
10+
contents: write
11+
jobs:
12+
build-and-deploy:
13+
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Install and Build # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
20+
run: |
21+
pip install json-schema-for-humans
22+
pip install -e .
23+
python -c 'import jstyleson; from nncf.config import NNCFConfig; jstyleson.dump(NNCFConfig.schema(), open("./schema.json", "w"), indent=2)'
24+
mkdir schema_html_build
25+
generate-schema-doc --deprecated-from-description schema.json schema_html_build/index.html
26+
- name: Deploy
27+
uses: JamesIves/github-pages-deploy-action@v4
28+
with:
29+
folder: schema_html_build # The folder the action should deploy.
30+
token: ${{ secrets.PUSH_TO_GH_PAGES_BRANCH }}
31+
branch: doc_pages

.github/workflows/labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ on: [pull_request_target]
33

44
jobs:
55
triage:
6+
permissions:
7+
contents: read
8+
pull-requests: write
69
runs-on: ubuntu-latest
710
steps:
8-
- uses: actions/labeler@v3
11+
- uses: actions/labeler@v4
912
with:
1013
repo-token: "${{ secrets.GITHUB_TOKEN }}"
14+
configuration-path: '.github/labeler.yml'
1115
sync-labels: true

.github/workflows/python-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2019-2020 Intel Corporation
2+
# Copyright (c) 2019-2023 Intel Corporation
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
@@ -33,13 +33,13 @@ jobs:
3333
- name: Install dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install setuptools wheel twine
36+
pip install setuptools wheel build twine
3737
- name: Build and publish
3838
env:
3939
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
4040
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
4141
run: |
42-
python setup.py sdist bdist_wheel --release
42+
python -m build -C--global-option=--release
4343
4444
# Disallow uploading dev packages
4545
for file in dist; do

.gitignore

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,22 @@ ENV/
103103

104104
# PyCharm
105105
.idea
106+
.run
106107

107108
# snapshots
108109
*.tar
109110

110111
# object detection eval results
111-
examples/torch/object_detection/eval/
112+
examples/torch/object_detection/eval/
113+
114+
# VSCode
115+
.vscode/
116+
117+
# NNCF debug
118+
nncf_debug/
119+
120+
# NNCF examples
121+
examples/post_training_quantization/onnx/mobilenet_v2/mobilenet_v2_*
122+
examples/post_training_quantization/openvino/mobilenet_v2/mobilenet_v2_*
123+
examples/post_training_quantization/tensorflow/mobilenet_v2/mobilenet_v2_*
124+
examples/post_training_quantization/torch/mobilenet_v2/mobilenet_v2_*

.pylintrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ disable = arguments-differ,
1919
wrong-import-order,
2020
attribute-defined-outside-init,
2121
import-outside-toplevel,
22-
duplicate-code
22+
duplicate-code,
23+
consider-using-f-string,
24+
logging-fstring-interpolation,
25+
cyclic-import
2326

2427
max-line-length = 120
2528
ignore-docstrings = yes
@@ -38,3 +41,8 @@ good-names = logger,fn
3841
max-statements=60
3942
max-branches=13
4043
max-parents=9
44+
45+
[TYPECHECK]
46+
# List of members which are set dynamically and missed by pylint inference
47+
# system, and so shouldn't trigger E0201 or E1101 when accessed.
48+
generated-members=onnx.*

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ The latter forms are accepted as pull requests from your own forks of the NNCF r
1212

1313
Any contributions must not violate the repository's [LICENSE](./LICENSE) requirements.
1414

15+
## Installation
16+
### (Experimental) ONNXRuntime-OpenVINO
17+
Install the package and its dependencies by running the following in the repository root directory:
18+
```bash
19+
make install-onnx-dev
20+
```
21+
1522
## Testing
1623

1724
After your pull request is submitted, the maintainer will launch a scope of CI tests against it.
@@ -29,6 +36,13 @@ The test files themselves may be grouped in arbitrary directories according to t
2936
Any additional tests in the [tests](./tests) directory will be automatically added into the pre-commit CI scope.
3037
If your testing code is more extensive than unit tests (in terms of test execution time), or would be more suited to be executed on a nightly/weekly basis instead of for each future commit, please inform the maintainers in your PR discussion thread so that our internal testing pipelines could be adjusted accordingly.
3138

39+
### Preset command for testing
40+
You can launch appropriate tests against the framework by running the following command:
41+
42+
- (Experimental) ONNXRuntime-OpenVINO
43+
```bash
44+
test-onnx
45+
```
3246

3347
## Code style
3448
Changes to NNCF Python code should conform to [Python Style Guide](./docs/styleguide/PyGuide.md)
@@ -37,6 +51,14 @@ Pylint is used throughout the project to ensure code cleanliness and quality.
3751
A Pylint run is also done as part of the pre-commit scope - the pre-commit `pytest` scope will not be run if your code fails the Pylint checks.
3852
The Pylint rules and exceptions for this repository are described in the standard [.pylintrc](./.pylintrc) format - make sure your local linter uses these.
3953

54+
### Preset command for linting
55+
You can launch appropriate linting against the framework by running the following command:
56+
57+
- (Experimental) ONNXRuntime-OpenVINO
58+
```bash
59+
pylint-onnx
60+
```
61+
4062
## Binary files
4163
Please refrain from adding huge binary files into the repository. If binary files have to be added, mark these to use Git LFS via the [.gitattributes](./.gitattributes) file.
4264

0 commit comments

Comments
 (0)