diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index cbb456748d5c79..bce04b73f82898 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -4,7 +4,7 @@ trigger: - master - releases/* paths: - exclude: + exclude: - docs/ - /**/docs/* - /**/*.md @@ -17,7 +17,7 @@ pr: - master - releases/* paths: - exclude: + exclude: - docs/ - /**/docs/* - /**/*.md @@ -89,25 +89,25 @@ jobs: rd /Q /S $(BUILD_SAMPLES_DIR) & mkdir $(BUILD_SAMPLES_DIR) rd /Q /S $(BUILD_SAMPLES_TESTS_DIR) & mkdir $(BUILD_SAMPLES_TESTS_DIR) displayName: 'Make dir' - + - script: curl -O https://www.python.org/ftp/python/3.10.7/python-3.10.7-amd64.exe displayName: 'Download Python' workingDirectory: $(WORK_DIR) continueOnError: false - + - script: | python-3.10.7-amd64.exe /passive InstallAllUsers=0 Include_launcher=0 TargetDir=C:\hostedtoolcache\windows\Python\3.10.7\x64 cp C:\hostedtoolcache\windows\Python\3.8.2\x64.complete C:\hostedtoolcache\windows\Python\3.10.7\x64.complete displayName: 'Install Python' workingDirectory: $(WORK_DIR) continueOnError: false - + - task: UsePythonVersion@0 displayName: 'Use Python' inputs: - versionSpec: '3.10.7' + versionSpec: '3.10' disableDownloadFromRegistry: true - + - script: | powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom" tree C:\hostedtoolcache\windows\Python diff --git a/.github/github_org_control/config.json b/.github/github_org_control/config.json index a0ddd443d9a894..5c07218fbd6209 100644 --- a/.github/github_org_control/config.json +++ b/.github/github_org_control/config.json @@ -19,26 +19,34 @@ }, "DRY_RUN": false, "TEAM_TO_LABEL": { - "openvino-admins": "category: CI", - "openvino-maintainers": "category: IE common", + "openvino-ci-maintainers": "category: CI", + "openvino-maintainers": "category: inference", "openvino-docs-maintainers": "category: docs", - "openvino-ie-maintainers": "category: IE common", + "openvino-ie-maintainers": "category: inference", "openvino-ie-cpu-maintainers": "category: CPU", "openvino-ie-gna-maintainers": "category: GNA", "openvino-ie-gpu-maintainers": "category: GPU", "openvino-ie-lpt-maintainers": "category: LP transformations", - "openvino-ie-auto-multi-maintainers": "category: MULTI", - "openvino-ie-python-api-maintainers": "category: python api", + "openvino-ie-transformations-maintainers": "category: transformations", + "openvino-ie-auto-multi-maintainers": "category: AUTO", + "openvino-auto-batch-maintainers": "category: AUTO BATCH", + "openvino-hetero-maintainers": "category: HETERO", + "openvino-ie-python-api-maintainers": "category: Python API", "openvino-ie-template-maintainers": "category: TEMPLATE", + "openvino-ir-frontend-maintainers": "category: IR FE", + "openvino-ie-paddle-maintainers": "category: PDPD FE", + "openvino-tf-frontend-maintainers": "category: TF FE", + "openvino-onnx-frontend-maintainers": "category: ONNX FE", "openvino-ie-tests-maintainers": "category: IE Tests", "openvino-ie-vpu-maintainers": "category: VPU", "openvino-mo-maintainers": "category: MO", - "openvino-ngraph-maintainers": "category: nGraph", + "openvino-ngraph-maintainers": "category: Core", "openvino-scripts-maintainers": "category: build", "openvino-tests-maintainers": "category: IE Tests", "openvino-tools-maintainers": "category: tools", "openvino-pot-maintainers": "category: POT", "openvino-configuration-mgmt": "category: dependency_changes", - "openvino-samples-maintainers": "category: samples" + "openvino-samples-maintainers": "category: samples", + "openvino-c-api-maintainers": "category: C API" } } diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 346120252c65d7..72b2a4e7b984d5 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -1,5 +1,14 @@ name: Documentation -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'master' + - 'releases/**' + +env: + DOXY_VER: '1.9.2' + DOXYREST_VER: '2.1.3' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -7,84 +16,47 @@ concurrency: jobs: Build_Doc: - if: github.repository == 'openvinotoolkit/openvino' - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - name: Clone OpenVINO - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: true lfs: true - # cache from ccache - - name: Cache ccache - id: cache_restore - uses: actions/cache@v3 - with: - path: .ccache - key: doc-ccache-cache - - - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: doc-ccache-cache - save: false - - # cache from doxygen build - - name: Cache doxygen make - id: cache_doxygen_make - uses: actions/cache@v3 + - name: Install apt-get dependencies + uses: awalsh128/cache-apt-pkgs-action@v1.1.3 with: - path: doxygen-build - key: build-doxygen-cache + packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9 + version: 3.0 - # cache from python packages - - name: Cache python requirements - id: cache_python_requirements - uses: actions/cache@v3 + - uses: actions/setup-python@v4 + id: cp310 with: - path: ~/.cache/pip - key: doc-python-requirements + python-version: '3.10' + cache: 'pip' + cache-dependency-path: | + docs/requirements.txt + docs/openvino_sphinx_theme/setup.py - - name: Install apt-get tools - uses: awalsh128/cache-apt-pkgs-action@v1.1.3 - # install doc dependencies - with: - packages: graphviz texlive liblua5.2-0 - version: 3.0 + - name: Install python dependencies + run: | + python3 -m pip install -r docs/requirements.txt + (cd docs/openvino_sphinx_theme && python3 setup.py install) - - name: Install dependencies + - name: Download and install doxygen && doxyrest run: | - set -e - python3 -m pip install -r docs/requirements.txt --user - cd docs/openvino_sphinx_theme - python3 setup.py install --user - cd ../.. # install doxyrest - wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.3/doxyrest-2.1.3-linux-amd64.tar.xz - tar -xf doxyrest-2.1.3-linux-amd64.tar.xz - echo "$(pwd)/doxyrest-2.1.3-linux-amd64/bin/" >> $GITHUB_PATH + wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-$DOXYREST_VER/doxyrest-$DOXYREST_VER-linux-amd64.tar.xz + tar -xf doxyrest-$DOXYREST_VER-linux-amd64.tar.xz + echo "$(pwd)/doxyrest-$DOXYREST_VER-linux-amd64/bin/" >> $GITHUB_PATH # install doxygen - mkdir doxygen - cd doxygen - git clone --depth 1 https://github.com/doxygen/doxygen.git -b Release_1_9_2 - cmake \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -S doxygen \ - -B ../doxygen-build - cmake --build ../doxygen-build -j`nproc` - sudo cmake --build ../doxygen-build --target install - - - name: CMake doc - run: | - cmake \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DENABLE_INTEL_MYRIAD_COMMON=OFF \ - -DENABLE_DOCS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -B build + wget https://sourceforge.net/projects/doxygen/files/rel-$DOXY_VER/doxygen-$DOXY_VER.linux.bin.tar.gz + tar -xzf doxygen-$DOXY_VER.linux.bin.tar.gz + echo "$(pwd)/doxygen-$DOXY_VER/bin/" >> $GITHUB_PATH + + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DENABLE_DOCS=ON -B build - name: Cache documentation id: cache_sphinx_docs @@ -92,16 +64,40 @@ jobs: with: path: build/docs/_build/.doctrees key: sphinx-docs-cache - - - name: Build doc - run: | - cmake --build build --target sphinx_docs -j`nproc` - - - name: Archive HTML + + - name: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v1 + id: cpu-cores + + - name: Build docs + run: cmake --build build --target sphinx_docs --parallel ${{ steps.cpu-cores.outputs.count }} + + - name: Archive docs HTML + run: (cd build/docs && zip -r openvino_docs_html.zip _build) + + - name: Set PR number run: | - zip -r openvino_html.zip _build - working-directory: build/docs - + PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') + echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV + + - name: 'Upload doxygen.log' + uses: actions/upload-artifact@v3 + with: + name: doxygen_build_log_${{ env.PR_NUMBER }}.log + path: build/docs/doxygen.log + + - name: 'Upload sphinx.log' + uses: actions/upload-artifact@v3 + with: + name: sphinx_build_log_${{ env.PR_NUMBER }}.log + path: build/docs/sphinx.log + + - name: 'Upload docs html' + uses: actions/upload-artifact@v3 + with: + name: openvino_docs_html_${{ env.PR_NUMBER }}.zip + path: build/docs/openvino_docs_html.zip + - name: Run Pytest run: | pytest --doxygen="./build/docs/doxygen.log" \ @@ -116,29 +112,8 @@ jobs: --self-contained-html ./docs/scripts/tests/test_docs.py - name: 'Upload test results' - if: always() - uses: actions/upload-artifact@v2 + if: failure() + uses: actions/upload-artifact@v3 with: - name: openvino_doc_pytest + name: openvino_docs_pytest path: build/docs/_artifacts/ - - - name: 'Upload doxygen.log' - if: always() - uses: actions/upload-artifact@v2 - with: - name: doxygen_log - path: build/docs/doxygen.log - - - name: 'Upload sphinx.log' - if: always() - uses: actions/upload-artifact@v2 - with: - name: sphinx_log - path: build/docs/sphinx.log - - - name: 'Upload html' - if: always() - uses: actions/upload-artifact@v2 - with: - name: openvino_html - path: build/docs/openvino_html.zip diff --git a/.github/workflows/check_pr_commits.yml b/.github/workflows/check_pr_commits.yml index 68ad3e41bbca63..41d1564a0cad1d 100644 --- a/.github/workflows/check_pr_commits.yml +++ b/.github/workflows/check_pr_commits.yml @@ -1,16 +1,12 @@ name: PR Commits on: [pull_request] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - jobs: Checks: runs-on: ubuntu-22.04 steps: - name: Clone OpenVINO - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install dependencies run: python3 -m pip install -r ./.github/github_org_control/requirements.txt diff --git a/.github/workflows/code_snippets.yml b/.github/workflows/code_snippets.yml index dc669ad980451d..f5c7f1972798ff 100644 --- a/.github/workflows/code_snippets.yml +++ b/.github/workflows/code_snippets.yml @@ -4,6 +4,9 @@ on: paths: - '.github/workflows/code_snippets.yml' - 'docs/snippets/**' + branches: + - 'master' + - 'releases/**' pull_request: paths: - '.github/workflows/code_snippets.yml' @@ -22,27 +25,17 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Clone OpenVINO - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive lfs: true - - name: Check cmake - run: | - which cmake - cmake --version - - - name: CMake - run: | - mkdir build - cd build - cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DCMAKE_BUILD_TYPE=Release .. + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DCMAKE_BUILD_TYPE=Release -B build - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v1 id: cpu-cores - name: Build snippets - run: | - cmake --build . --target ie_docs_snippets -j${{ steps.cpu-cores.outputs.count }} - working-directory: build + run: cmake --build build --target ie_docs_snippets --parallel ${{ steps.cpu-cores.outputs.count }} diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index 17ff75bf1f5c40..dfe3d9e3de1b0f 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -1,5 +1,10 @@ name: Code Style -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'master' + - 'releases/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -9,7 +14,7 @@ jobs: clang-format: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -28,15 +33,12 @@ jobs: python3 -m pip install -r ./src/bindings/python/src/compatibility/openvino/requirements-dev.txt # Run cmake with -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT in order to enable codestyle check for ITT collector - - name: CMake + - name: CMake configure run: | - mkdir build - cd build - cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT .. + cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -B build - name: Check code style - run: cmake --build . --target clang_format_check_all -j8 - working-directory: build + run: cmake --build build --target clang_format_check_all -j8 - name: Create code style diff if: failure() @@ -51,7 +53,7 @@ jobs: level: error tool_name: clang-format - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: code_style_diff @@ -60,7 +62,7 @@ jobs: ShellCheck: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -69,23 +71,16 @@ jobs: sudo apt update sudo apt --assume-yes install shellcheck - - name: Install dependencies - run: python3 -m pip install -r ./src/bindings/python/requirements.txt - - - name: CMake - run: | - mkdir build - cd build - cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF .. + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -B build - name: ShellCheck - run: cmake --build . --target ie_shellcheck -j8 - working-directory: build + run: cmake --build build --target ie_shellcheck -j8 NamingConventionCheck: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -98,12 +93,8 @@ jobs: - name: Install Python-based dependencies run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt - - name: CMake - run: | - mkdir build - cd build - cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF .. + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -B build - name: Naming convention check - run: cmake --build . --target ncc_all -j8 - working-directory: build + run: cmake --build build --target ncc_all -j8 diff --git a/.github/workflows/files_size.yml b/.github/workflows/files_size.yml index 35a4431d436034..ce9757af172ba8 100644 --- a/.github/workflows/files_size.yml +++ b/.github/workflows/files_size.yml @@ -9,13 +9,10 @@ jobs: Check_Files_Size: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: git ls-tree - run: | - git ls-tree -r -t -l --full-name HEAD | sort -n -r -k 4 + run: git ls-tree -r -t -l --full-name HEAD | sort -n -r -k 4 - name: git lfs ls-files - run: | - git lfs ls-files --size - + run: git lfs ls-files --size diff --git a/.github/workflows/mo.yml b/.github/workflows/mo.yml index 266b57cb9a5ced..330a4e63573635 100644 --- a/.github/workflows/mo.yml +++ b/.github/workflows/mo.yml @@ -3,9 +3,14 @@ on: push: paths: - 'openvino/tools/mo/**' + - '.github/workflows/mo.py' + branches: + - 'master' + - 'releases/**' pull_request: paths: - 'openvino/tools/mo/**' + - '.github/workflows/mo.py' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -15,12 +20,12 @@ jobs: Pylint-UT: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: python-version: 3.7 @@ -33,9 +38,9 @@ jobs: ${{ runner.os }}-pip- ${{ runner.os }}- - # tensorflow 1.15 causes modules import - # errors, most likely due to https://github.com/PyCQA/pylint/issues/2603 - # for tensorflow.core.framework and tensorflow.contrib + # tensorflow 1.15 causes modules import + # errors, most likely due to https://github.com/PyCQA/pylint/issues/2603 + # for tensorflow.core.framework and tensorflow.contrib - name: Install dependencies run: | python -m pip install --upgrade pip setuptools @@ -53,11 +58,8 @@ jobs: run: pylint -d C,R,W openvino/tools/mo/ openvino/tools/mo/mo.py working-directory: openvino/tools/mo - - name: CMake - run: | - mkdir build - cd build - cmake .. + - name: CMake configure + run: cmake -B build - name: UT run: | diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.yml index 56f8d434b4b875..5010a6c75359c4 100644 --- a/.github/workflows/py_checks.yml +++ b/.github/workflows/py_checks.yml @@ -7,6 +7,9 @@ on: - 'src/bindings/python/**' - 'samples/python/**' - '.github/workflows/py_checks.yml' + branches: + - 'master' + - 'releases/**' pull_request: paths: - 'src/bindings/python/**' @@ -22,103 +25,124 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Code checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - - name: Set up Python - uses: actions/setup-python@v2 + + - name: Setup Python + uses: actions/setup-python@v4 with: python-version: '3.7' + - name: Install dependencies run: python -m pip install -r src/bindings/python/requirements_test.txt + # samples code-style - name: Run flake8 on samples run: python -m flake8 ./ --config=setup.cfg working-directory: samples/python + - name: Create code style diff for samples if: failure() run: | python -m black -l 160 -S ./ git diff > samples_diff.diff working-directory: samples/python - - uses: actions/upload-artifact@v2 + + - uses: actions/upload-artifact@v3 if: failure() with: name: samples_diff path: samples_diff.diff + # IE Python API Flake code-style - name: Run flake8 on IE Python API run: python -m flake8 ./ --config=setup.cfg working-directory: src/bindings/python/src/compatibility/openvino + - name: Create code style diff for IE Python API if: failure() run: | python -m black -l 160 -S ./ git diff > ie_python_diff.diff working-directory: src/bindings/python/src/compatibility/openvino - - uses: actions/upload-artifact@v2 + + - uses: actions/upload-artifact@v3 if: failure() with: name: ie_python_diff path: ie_python_diff.diff + # nGraph Python API Flake code-style - name: Run flake8 on nGraph Python API run: python -m flake8 ./src/compatibility/ngraph --config=setup.cfg working-directory: src/bindings/python + - name: Create code style diff for nGraph Python API if: failure() run: | python -m black -l 160 -S ./ git diff > pyngraph_diff.diff working-directory: src/bindings/python/src/compatibility/ngraph - - uses: actions/upload-artifact@v2 + + - uses: actions/upload-artifact@v3 if: failure() with: name: pyngraph_diff path: pyngraph_diff.diff + # Python API 2.0 Flake code-style - name: Run flake8 on Python API 2.0 run: python -m flake8 ./src/openvino --config=setup.cfg working-directory: src/bindings/python + - name: Create code style diff for Python API 2.0 if: failure() run: | python -m black -l 160 -S ./ git diff > pyopenvino_diff.diff working-directory: src/bindings/python/src/openvino - - uses: actions/upload-artifact@v2 + + - uses: actions/upload-artifact@v3 if: failure() with: name: pyopenvino_diff path: pyopenvino_diff.diff + # wheel Flake code-style - name: Run flake8 on wheel run: python -m flake8 ./ --config=../setup.cfg working-directory: src/bindings/python/wheel + - name: Create code style diff for wheel if: failure() run: | python -m black -l 160 -S ./ git diff > wheel_diff.diff working-directory: src/bindings/python/wheel - - uses: actions/upload-artifact@v2 + + - uses: actions/upload-artifact@v3 if: failure() with: name: wheel_diff path: wheel_diff.diff + # Python API 2.0 tests Flake code-style - name: Run flake8 on python tests # ignore lack of docs in tests run: python -m flake8 tests/ --config=setup.cfg working-directory: src/bindings/python + # IE Python API mypy check - name: Run mypy on IE Python API run: python -m mypy ./ --config-file ./setup.cfg working-directory: src/bindings/python/src/compatibility/openvino + # nGraph Python API mypy check - name: Run mypy on nGraph Python API run: python -m mypy ./src/compatibility/ngraph --config-file ./setup.cfg working-directory: src/bindings/python + # Python API 2.0 mypy check - name: Run mypy on Python API 2.0 run: python -m mypy ./src/openvino --config-file ./setup.cfg diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 509aeb11b66bd7..77b0bd16b2267e 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -126,8 +126,8 @@ function(build_docs) get_filename_component(OVMS_DOCS_DIR "${OVMS_DOCS_DIR}" ABSOLUTE) list(APPEND commands COMMAND ${PYTHON_EXECUTABLE} ${DOXY_MD_FILTER} - --input_dir=${OVMS_DOCS_DIR} - --output_dir=${DOCS_BUILD_DIR}/ovms) + --input_dir=${OVMS_DOCS_DIR} + --output_dir=${DOCS_BUILD_DIR}/ovms) endif() add_custom_target(preprocess_docs diff --git a/docs/Documentation/model_introduction.md b/docs/Documentation/model_introduction.md index c6f19ec10cd53e..bae1df2014b549 100644 --- a/docs/Documentation/model_introduction.md +++ b/docs/Documentation/model_introduction.md @@ -28,7 +28,3 @@ This section describes the how to obtain and prepare your model for work with Op * [Automate model-related tasks with Model Downloader and additional OMZ Tools](https://docs.openvino.ai/latest/omz_tools_downloader.html). To begin with, you may want to [browse a database of models for use in your projects](../model_zoo.md). - - - -