Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into dl/channel_alignme…
Browse files Browse the repository at this point in the history
…nt_improvements_full
  • Loading branch information
daniil-lyakhov committed Aug 23, 2023
2 parents ce6ce26 + 5fdcc46 commit ecd15c9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/post_pr_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ jobs:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_common
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-onnx:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_onnx
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
run: make install-common-test
- name: Run common precommit test scope
run: make test-common
env:
NNCF_COVERAGE: 1
- name: Upload coverage report as artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -44,6 +46,8 @@ jobs:
run: make install-onnx-test
- name: Run ONNX precommit test scope
run: make test-onnx
env:
NNCF_COVERAGE: 1
- name: Upload coverage report as artifact
uses: actions/upload-artifact@v3
with:
Expand Down
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
JUNITXML_PATH ?= nncf-tests.xml
COVERAGE ?= --cov=./ --cov-report=xml

ifdef NNCF_COVERAGE
COVERAGE_ARGS ?= --cov=./ --cov-report=xml
else
COVERAGE_ARGS :=
endif

ifdef DATA
DATA_ARG := --data $(DATA)
Expand All @@ -26,7 +31,7 @@ install-onnx-dev: install-onnx-test install-pre-commit install-pylint
pip install -r examples/post_training_quantization/onnx/mobilenet_v2/requirements.txt

test-onnx:
pytest ${COVERAGE} tests/onnx $(DATA_ARG) --junitxml ${JUNITXML_PATH}
pytest ${COVERAGE_ARGS} tests/onnx $(DATA_ARG) --junitxml ${JUNITXML_PATH}

pylint-onnx:
pylint --rcfile .pylintrc \
Expand Down Expand Up @@ -60,8 +65,7 @@ install-openvino-dev: install-openvino-test install-pre-commit install-pylint
pip install -r examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control/requirements.txt

test-openvino:
# omitting ${COVERAGE} for internal runs since they seem to introduce a major slowdown
pytest tests/openvino $(DATA_ARG) --junitxml ${JUNITXML_PATH}
pytest ${COVERAGE_ARGS} tests/openvino $(DATA_ARG) --junitxml ${JUNITXML_PATH}

pylint-openvino:
pylint --rcfile .pylintrc \
Expand Down Expand Up @@ -91,8 +95,7 @@ install-tensorflow-dev: install-tensorflow-test install-pre-commit install-pylin
pip install -r examples/post_training_quantization/tensorflow/mobilenet_v2/requirements.txt

test-tensorflow:
# omitting ${COVERAGE} for internal runs since they seem to introduce a major slowdown
pytest tests/common tests/tensorflow \
pytest ${COVERAGE_ARGS} tests/common tests/tensorflow \
--junitxml ${JUNITXML_PATH} \
$(DATA_ARG)

Expand Down Expand Up @@ -121,8 +124,7 @@ install-torch-dev: install-torch-test install-pre-commit install-pylint
pip install -r examples/post_training_quantization/torch/ssd300_vgg16/requirements.txt

test-torch:
# omitting ${COVERAGE} for internal runs since they seem to introduce a major slowdown
pytest tests/common tests/torch --junitxml ${JUNITXML_PATH} $(DATA_ARG)
pytest ${COVERAGE_ARGS} tests/common tests/torch --junitxml ${JUNITXML_PATH} $(DATA_ARG)

COMMON_PYFILES := $(shell python3 tools/collect_pylint_input_files_for_backend.py common)
pylint-torch:
Expand Down Expand Up @@ -160,7 +162,7 @@ pylint-common:
$(COMMON_PYFILES)

test-common:
pytest ${COVERAGE} tests/common $(DATA_ARG) --junitxml ${JUNITXML_PATH}
pytest ${COVERAGE_ARGS} tests/common $(DATA_ARG) --junitxml ${JUNITXML_PATH}

test-examples:
pytest tests/cross_fw/examples -s --junitxml ${JUNITXML_PATH}
Expand Down
11 changes: 6 additions & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ ignore:
- "tests"
- "tools"

#codecov:
# notify:
# after_n_builds: 4
# wait_for_ci: yes
codecov:
notify:
after_n_builds: 2
wait_for_ci: no

coverage:
status:
Expand All @@ -25,7 +25,8 @@ coverage:
informational: true
only_pulls: true
paths:
- "nncf/onnx" # extend this once we collect coverage reports for more than just onnx part of precommit
- "nncf/onnx"
- "nncf/common" # extend this once we collect coverage reports for more than just onnx and common part of precommit

comment:
layout: "diff, flags, files"
Expand Down

0 comments on commit ecd15c9

Please sign in to comment.