Skip to content

Commit

Permalink
Merge openvinotoolkit/develop into nm/bf16_support
Browse files Browse the repository at this point in the history
  • Loading branch information
KodiaqQ committed Apr 17, 2024
2 parents 91bb312 + 573b0c3 commit ff8f0ca
Show file tree
Hide file tree
Showing 1,582 changed files with 260,749 additions and 1,733,157 deletions.
12 changes: 0 additions & 12 deletions .dockerignore

This file was deleted.

58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 🐛 Bug Report
description: Help us improve NNCF.
labels: ["bug"]
body:
- type: textarea
attributes:
label: 🐛 Describe the bug
description: Please provide a clear and concise description of the bug, as well console output with error messages and/or screenshots.
validations:
required: true

- type: textarea
attributes:
label: Environment
description: Please specify the software and hardware you used to produce the bug.
placeholder: |
Provide python environment using command:
Attach the `requirements.txt` file that is generated by `pip freeze > requirements.txt`
Manually:
Provide the NNCF version and OpenVINO, Torch, TensorFlow, ONNX versions if applicable.
Additionally:
OS Ubuntu 20.04.5 LTS
Python 3.10.0
Install git
RAM 32.00 GB
CPU Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz
CUDA None
validations:
required: true

- type: textarea
attributes:
label: Minimal Reproducible Example
description: |
How can we reproduce your issue?
The minimal code snippet that is easy to understand and can be used to reproduce the issue is the best explanation of the issue!
placeholder: |
```
# Code to reproduce your issue here
```
validations:
required: false

- type: checkboxes
attributes:
label: Are you going to submit a PR?
description: >
(Optional) We'd love your help! If you have a good understanding of how to implement a fix or feature, you can submit a [Pull Request](https://github.com/openvinotoolkit/nncf/pulls) (PR).
See the NNCF [Contributing Guide](https://github.com/openvinotoolkit/nncf/blob/develop/CONTRIBUTING.md) to get started.
options:
- label: Yes I'd like to help by submitting a PR!

- type: markdown
attributes:
value: >
Thanks for contributing 🎉!
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: ❓ Questions
url: https://github.com/openvinotoolkit/nncf/discussions
about: Ask questions and discuss with other NNCF community members
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 🚀 Feature request
description: Submit a proposal/request for a new NNCF feature
labels: ["enhancement"]
body:
- type: textarea
attributes:
label: 🚀 Feature request
description: >
A clear and concise description of the feature proposal. Please provide a link to the paper and code in case they exist.
validations:
required: true

- type: textarea
attributes:
label: Feature Use Case
description: What is the use case of the feature you are proposing?
placeholder: What is the new feature use case? How will it be useful?
validations:
required: false

- type: checkboxes
attributes:
label: Are you going to submit a PR?
description: >
(Optional) We'd love your help! If you have a good understanding of how to implement a fix or feature, you can submit a [Pull Request](https://github.com/openvinotoolkit/nncf/pulls) (PR).
See the NNCF [Contributing Guide](https://github.com/openvinotoolkit/nncf/blob/develop/CONTRIBUTING.md) to get started.
options:
- label: Yes I'd like to help by submitting a PR!

- type: markdown
attributes:
value: >
Thanks for contributing 🎉!
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/good_first_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: 🤩 Good First Issue
description: Create a Good First Issue for new contributors.
title: "[Good First Issue][NNCF]: "
labels: ["good first issue"]
body:
- type: textarea
id: context
attributes:
label: Context
description: |
Let the contributors know what your component is responsible for,
what's the importance of the change and why it's needed.
Keep in mind the Good First Issue is for new contributors.
placeholder: What is it and why is it important?
validations:
required: true

- type: textarea
id: todo_list
attributes:
label: What needs to be done?
description: |
Be as verbose as possible, provide a TODO list if viable.
validations:
required: true

- type: textarea
id: example_prs
attributes:
label: Example Pull Requests
description: |
Provide example Pull requests, if there are any.
validations:
required: false

- type: textarea
id: resources
attributes:
label: Resources
description: |
Any materials related to the task, such as operator specifications,
discussions, guides.
value: |
- [Contribution guide - start here!](https://github.com/openvinotoolkit/nncf/blob/develop/CONTRIBUTING.md)
- [Intel DevHub Discord channel](https://discord.gg/7pVRxUwdWG) - engage in discussions, ask questions and talk to OpenVINO developers
- [How to link your Pull Request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#manually-linking-a-pull-request-to-an-issue-using-the-pull-request-sidebar)
validations:
required: true

- type: textarea
id: contact_points
attributes:
label: Contact points
description: |
People who can be asked questions about the task.
placeholder: GitHub users
validations:
required: true

- type: textarea
id: ticket
attributes:
label: Ticket
description: |
Provide the ticket number, if available.
validations:
required: false
3 changes: 0 additions & 3 deletions .github/issue_template.md

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/assign_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Take Issue

on:
issue_comment:
types:
- created
- edited

jobs:
take-issue:
name: Take issue
runs-on: ubuntu-latest
permissions:
issues: write
timeout-minutes: 10
steps:
- name: take an issue
uses: bdougie/[email protected]
with:
message: Thank you for looking into this issue! Please let us know if you have any questions or require any help.
issueCurrentlyAssignedMessage: Thanks for being interested in this issue. It looks like this ticket is already assigned to a contributor. Please communicate with the assigned contributor to confirm the status of the issue.
trigger: .take
token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: mypy

on:
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
mypy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.8.10
- name: Install NNCF
run: pip install -e .
- name: Install mypy
run: pip install mypy==1.8.0
- name: Run mypy
run: mypy --install-types --config-file=.mypy.ini --non-interactive
13 changes: 13 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: nightly

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
md-dead-link-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: AlexanderDokuchaev/[email protected]
5 changes: 5 additions & 0 deletions .github/workflows/pre-commit-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ jobs:
run: make install-pre-commit
- name: Run pre-commit linter suite
run: make pre-commit
md-dead-link-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: AlexanderDokuchaev/[email protected]
3 changes: 3 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- opened
- reopened
- synchronize
paths-ignore:
- '**/*.md'
- 'docs/**/*'

jobs:
common:
Expand Down
9 changes: 9 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[mypy]
files = nncf/common/sparsity, nncf/common/graph
follow_imports = silent
strict = True

# should be removed later
# mypy recommends the following tool as an autofix:
# https://github.com/hauntsaninja/no_implicit_optional
implicit_optional = True
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.3
rev: v0.3.7
hooks:
- id: ruff

Expand All @@ -26,3 +26,4 @@ repos:
hooks:
- id: markdownlint
args: [--config=.markdownlint.yaml]

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Please run the pre-commit testing scope locally before submitting your PR and en
New feature pull requests should include all the necessary testing code.
Testing is done using the `pytest` framework.
The test files should be located inside the [tests](./tests) directory and start with `test_` so that the `pytest` is able to discover them.
Any additional data that is required for tests (configuration files, mock datasets, etc.) must be stored within the [tests/data](./tests/data) folder.
Any additional data that is required for tests (configuration files, mock datasets, etc.) must be stored within the `tests/<framework>/data` folder.
The test files themselves may be grouped in arbitrary directories according to their testing purpose and common sense.

Any additional tests in the [tests](./tests) directory will be automatically added into the pre-commit CI scope.
Expand Down
32 changes: 27 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ ifdef DATA
DATA_ARG := --data $(DATA)
endif

ifdef SOTA_DATA_DIR
SOTA_DATA_DIR_ARG := --sota-data-dir $(SOTA_DATA_DIR)
endif

ifdef SOTA_CHKP_DIR
SOTA_CHKP_DIR_ARG := --sota-checkpoints-dir $(SOTA_CHKP_DIR)
endif

ifdef WEEKLY_MODELS
WEEKLY_MODELS_ARG := --weekly-models $(WEEKLY_MODELS)
endif
Expand All @@ -23,6 +31,8 @@ install-pre-commit:
install-onnx-test:
pip install -U pip
pip install -e .[onnx]
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
pip install -r tests/onnx/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
pip install -r tests/cross_fw/examples/requirements.txt
Expand Down Expand Up @@ -50,6 +60,8 @@ test-examples-onnx:
install-openvino-test:
pip install -U pip
pip install -e .[openvino]
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
pip install tensorflow==2.12.0
pip install -r tests/openvino/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
Expand Down Expand Up @@ -79,6 +91,8 @@ test-examples-openvino:
install-tensorflow-test:
pip install -U pip
pip install -e .[tf]
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
pip install -r tests/tensorflow/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
pip install -r tests/cross_fw/examples/requirements.txt
Expand All @@ -88,7 +102,12 @@ install-tensorflow-dev: install-tensorflow-test install-pre-commit
pip install -r examples/post_training_quantization/tensorflow/mobilenet_v2/requirements.txt

test-tensorflow:
pytest ${COVERAGE_ARGS} tests/tensorflow \
pytest ${COVERAGE_ARGS} tests/tensorflow -m "not nightly" \
--junitxml ${JUNITXML_PATH} \
$(DATA_ARG)

test-tensorflow-nightly:
pytest ${COVERAGE_ARGS} tests/tensorflow -m 'nightly' \
--junitxml ${JUNITXML_PATH} \
$(DATA_ARG)

Expand All @@ -102,11 +121,13 @@ test-examples-tensorflow:
# PyTorch backend
install-torch-test:
pip install -U pip
pip install -e .[torch] --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple # ticket 119128
pip install -r tests/torch/requirements.txt --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple
pip install -e .[torch]
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
pip install -r tests/torch/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
pip install -r tests/cross_fw/examples/requirements.txt
pip install -r examples/torch/requirements.txt --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple
pip install -r examples/torch/requirements.txt

install-torch-dev: install-torch-test install-pre-commit
pip install -r examples/post_training_quantization/torch/mobilenet_v2/requirements.txt
Expand All @@ -128,7 +149,8 @@ test-torch-nightly:
pytest ${COVERAGE_ARGS} tests/torch -m nightly --junitxml ${JUNITXML_PATH} $(DATA_ARG)

test-torch-weekly:
pytest ${COVERAGE_ARGS} tests/torch -m weekly --junitxml ${JUNITXML_PATH} $(DATA_ARG) ${WEEKLY_MODELS_ARG}
pytest ${COVERAGE_ARGS} tests/torch -m weekly \
--junitxml ${JUNITXML_PATH} $(DATA_ARG) $(SOTA_DATA_DIR_ARG) $(SOTA_CHKP_DIR_ARG) ${WEEKLY_MODELS_ARG}

test-install-torch-cpu:
pytest tests/cross_fw/install -s \
Expand Down
Loading

0 comments on commit ff8f0ca

Please sign in to comment.