Skip to content

Commit

Permalink
Merge branch 'master' into tj/plugin/template/test/compare-tensor-irdft
Browse files Browse the repository at this point in the history
  • Loading branch information
t-jankowski authored Nov 25, 2024
2 parents 8d15096 + 8ec51b2 commit f6b83db
Show file tree
Hide file tree
Showing 519 changed files with 17,808 additions and 30,243 deletions.
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@
/tools/ @openvinotoolkit/openvino-tools-maintainers
/tools/benchmark_tool/ @openvinotoolkit/openvino-ie-python-api-maintainers
/tools/legacy/ @openvinotoolkit/openvino-samples-maintainers
/tools/openvino_dev/ @openvinotoolkit/openvino-tools-maintainers @openvinotoolkit/openvino-ie-python-api-maintainers
/tools/mo/ @openvinotoolkit/openvino-mo-maintainers
/tools/ovc/ @openvinotoolkit/openvino-ovc-maintainers
/thirdparty/open_model_zoo/ @openvinotoolkit/omz-maintainers

Expand Down
48 changes: 48 additions & 0 deletions .github/actions/install_ov_wheels/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 'Find and install OpenVINO Python wheels'
description: 'Finds the OpenVINO Python wheels suitable for the "python3" executable and installs them'
inputs:
wheels-dir-path:
description: 'Path to the directory in which wheels are located'
required: true
wheels-to-install:
description: 'List of wheel names to install in the form of "openvino openvino_tokenizers"'
runs:
using: 'composite'
steps:
- name: Install OpenVINO Python wheels (Windows)
shell: pwsh
if: runner.os == 'Windows'
run: |
# Get the Python version
$pyVersion = python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')"
foreach ($wheel in $("${{ inputs.wheels-to-install }}" -split ' ')) {
# Search for the python-specific wheel version and install it if exists
$wheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*cp$pyVersion*.whl" | Select-Object -First 1
if ($wheelPath) {
python3 -m pip install $wheelPath.FullName
} else {
# If the python-specific version does not exist, install by name only
$wheelPathByName = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*.whl" | Select-Object -First 1
python3 -m pip install $wheelPathByName.FullName
}
}
- name: Install OpenVINO Python wheels (Linux and macOS)
shell: bash
if: runner.os != 'Windows'
run: |
py_version=$(python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")
for wheel in ${{ inputs.wheels-to-install }}; do
echo "Installing the ${wheel} wheel"
# Search for the python-specific wheel version and install it if exists
wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp$py_version*.whl")
echo "Wheel path: ${wheel_path}"
if [ -n "${wheel_path}" ]; then
python3 -m pip install $wheel_path
else
# If the python-specific version does not exist, install by name only
python3 -m pip install ${{ inputs.wheels-dir-path }}/$wheel-*.whl
fi
done
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ updates:
- "rkazants"
versioning-strategy: increase-if-necessary

# Model Optimizer, openvino_dev and Benchmark tool
# ovc and Benchmark tools
- package-ecosystem: pip
directory: "/tools"
schedule:
Expand Down
6 changes: 0 additions & 6 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@
'category: LP transformations':
- 'src/common/low_precision_transformations/**/*'

'category: MO':
- 'tools/mo/**/*'
- 'tests/layer_tests/mo_python_api_tests/**/*'

'category: OVC':
- 'tools/ovc/**/*'
- 'tests/layer_tests/ovc_python_api_tests/**/*'
Expand All @@ -119,7 +115,6 @@
- any: ['src/bindings/js/node/CMakeLists.txt',
'src/bindings/js/node/package.json',
'src/bindings/js/node/package-lock.json']
- 'tools/openvino_dev/**/*'

'category: PDPD FE':
- 'src/frontends/paddle/**/*'
Expand Down Expand Up @@ -183,7 +178,6 @@

'category: tools':
- any: ['tools/**',
'!tools/mo/**/*',
'!tools/ovc/**/*']

'category: transformations':
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ jobs:
python3 -m pip install -r ${{ github.workspace }}/src/frontends/onnx/tests/requirements.txt
# For running TensorFlow frontend unit tests
python3 -m pip install -r ${{ github.workspace }}/src/frontends/tensorflow/tests/requirements.txt
# For MO unit tests
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_caffe.txt
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_kaldi.txt
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_onnx.txt
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_tf2.txt
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_dev.txt
- name: Build OpenVINO with CMake
uses: ashutoshvarma/action-cmake-build@ade188313bc7eaa6f14349569a64d8bc716342ff # master
Expand Down Expand Up @@ -84,9 +78,6 @@ jobs:
- name: Install wheel packages
run: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install_pkg -P '${{ github.workspace }}/build/cmake_install.cmake'

- name: Install python wheels
run: python3 -m pip install openvino-dev --find-links=${{ github.workspace }}/install_pkg/tools

- name: List binaries
run: ls -la ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}

Expand Down
58 changes: 55 additions & 3 deletions .github/workflows/job_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
description: 'A string of options passed to CMake'
type: string
required: true
build-additional-python-wheels:
description: 'Whether to build additional, i.e., non-system Python wheels. Should have Python 3.9-3.12 installed'
type: boolean
required: false
default: false

permissions: read-all

Expand Down Expand Up @@ -157,8 +162,7 @@ jobs:
run: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV

- name: CMake configure
run: |
cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }}
run: cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }}

- name: Clean ccache stats
run: '& ccache --zero-stats'
Expand All @@ -176,6 +180,54 @@ jobs:
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component tests
working-directory: ${{ env.BUILD_DIR }}

# Setup additional Python versions for wheels building
- name: Setup Python 3.9
if: ${{ inputs.build-additional-python-wheels }}
uses: ./openvino/.github/actions/setup_python
with:
version: '3.9'
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'

# Setup additional Python versions for wheels building
- name: Setup Python 3.10
if: ${{ inputs.build-additional-python-wheels }}
uses: ./openvino/.github/actions/setup_python
with:
version: '3.10'
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'

# Setup additional Python versions for wheels building
- name: Setup Python 3.12
if: ${{ inputs.build-additional-python-wheels }}
uses: ./openvino/.github/actions/setup_python
with:
version: '3.12'
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'

- name: Build additional Python wheels
if: ${{ inputs.build-additional-python-wheels }}
run: |
$pyVersions = '3.9', '3.10', '3.12'
foreach ($pyVersion in $pyVersions) {
$pyBuildDir = "${{ github.workspace }}/py$pyVersion"
New-Item -ItemType Directory -Path "$pyBuildDir" -Force
$pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""
$pythonExecutablePath = & cmd /c $pythonCommand
& $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"
cmake --build "$pyBuildDir" --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
}
- name: Pack Artifacts
run: |
$file = Get-ChildItem -Path "${{ env.INSTALL_DIR }}"
Expand Down Expand Up @@ -220,7 +272,7 @@ jobs:
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: openvino_wheels
path: ${{ env.BUILD_DIR }}/wheels/*.whl
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'

- name: Upload openvino tests package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_cxx_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
description: 'Timeout in minutes for the job'
type: number
required: false
default: 35
default: 45

permissions: read-all

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/job_onnx_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,11 @@ jobs:
run: |
# Install the core OV wheel
python3 -m pip install ./openvino-*.whl
extras_to_install="onnx"
# Find and install OV dev wheel
ov_dev_wheel_name=$(find . -name 'openvino_dev*.whl')
python3 -m pip install $ov_dev_wheel_name[$extras_to_install]
working-directory: ${{ env.INSTALL_WHEELS_DIR }}

- name: Install ONNX Models tests requirements
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/requirements_onnx

- name: Install Python tests dependencies
run: |
# To enable pytest parallel features
Expand Down
87 changes: 13 additions & 74 deletions .github/workflows/job_python_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,31 @@ jobs:
should-setup-pip-paths: ${{ runner.os == 'Linux' }}
self-hosted-runner: ${{ runner.os == 'Linux' }}

#
# Tests
#

- name: Install OpenVINO Python wheels
run: |
# Install the core OV wheel
python3 -m pip install ./openvino-*.whl
extras_to_install="caffe,kaldi,onnx,tensorflow2,pytorch"
# Find and install OV dev wheel
ov_dev_wheel_name=$(find . -name 'openvino_dev*.whl')
python3 -m pip install $ov_dev_wheel_name[$extras_to_install]
working-directory: ${{ env.INSTALL_WHEELS_DIR }}

- name: Install Python API tests dependencies
run: |
# To enable pytest parallel features
python3 -m pip install pytest-xdist[psutil]
python3 -m pip install -r ${INSTALL_TEST_DIR}/bindings/python/requirements_test.txt
python3 -m pip install -r ${INSTALL_TEST_DIR}/mo/requirements_dev.txt
- name: Install Python Layer tests dependencies and for OVC unit tests
run: |
# For torchvision to OpenVINO preprocessing converter
python3 -m pip install -r ${INSTALL_TEST_DIR}/python/preprocess/torchvision/requirements.txt
# layer test requirements
python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt
- name: Install ONNX tests dependencies
run: |
# ONNX tests requirements
python3 -m pip install -r ${INSTALL_TEST_DIR}/requirements_onnx
#
# Tests
Expand All @@ -127,18 +130,6 @@ jobs:
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \
--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py
- name: Model Optimizer unit tests
if: fromJSON(inputs.affected-components).MO.test
run: |
if [[ "${{ runner.os }}" == "Linux" ]] && [[ "${{ runner.arch }}" != "ARM64" ]]; then
# required for MxNet
apt-get install -y libgomp1 libquadmath0
fi
# Skips under tickets: 133405, 122666
python3 -m pytest -s ${INSTALL_TEST_DIR}/mo/unit_tests \
--junitxml=${INSTALL_TEST_DIR}/TEST-ModelOptimizer.xml
- name: Python ONNX operators tests
if: (fromJSON(inputs.affected-components).Python_API.test ||
fromJSON(inputs.affected-components).ONNX_FE.test) &&
Expand All @@ -153,32 +144,6 @@ jobs:
if: fromJSON(inputs.affected-components).MO.test
run: python3 -m pytest -s ${INSTALL_TEST_DIR}/ovc/unit_tests --junitxml=${INSTALL_TEST_DIR}/TEST-OpenVinoConversion.xml

- name: Install Python Layer tests dependencies
run: |
# For torchvision to OpenVINO preprocessing converter
python3 -m pip install -r ${INSTALL_TEST_DIR}/python/preprocess/torchvision/requirements.txt
# layer test requirements
python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt
- name: MO Python API Tests
if: fromJSON(inputs.affected-components).MO.test
run: |
# Import 'test_utils' installed in '<package_test>/tests/python/openvino'
export LD_LIBRARY_PATH=${PIP_INSTALL_PATH}/openvino/libs:$LD_LIBRARY_PATH
export PYTHONPATH=${INSTALL_TEST_DIR}/python
if [[ "${{ runner.os }}" == "Linux" ]] && [[ "${{ runner.arch }}" == "ARM64" ]]; then
# Find gomp lib
GOMP_LIB=$(find "${PIP_INSTALL_PATH}/torch/lib/../../torch.libs/" -name '*libgomp-*so*')
export LD_PRELOAD=${GOMP_LIB}
fi
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/mo_python_api_tests -n logical --junitxml=${INSTALL_TEST_DIR}/TEST-test_mo_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: OVC Python API Tests
if: fromJSON(inputs.affected-components).MO.test
run: |
Expand All @@ -205,16 +170,6 @@ jobs:
export LD_LIBRARY_PATH=${PIP_INSTALL_PATH}/openvino/libs:$LD_LIBRARY_PATH
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/py_frontend_tests --junitxml=${INSTALL_TEST_DIR}/TEST-test_py_fontend.xml
- name: ONNX Layer Tests
if: ${{ fromJSON(inputs.affected-components).ONNX_FE.test }}
run: |
# requires 'unit_tests' from 'tools/mo'
export PYTHONPATH=${INSTALL_TEST_DIR}/mo:$PYTHONPATH
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/onnx_tests -m "not launch_only_if_manually_specified and precommit" --junitxml=${INSTALL_TEST_DIR}/TEST-onnx.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: JAX Layer Tests - JAX FE
if: ${{ fromJSON(inputs.affected-components).JAX_FE.test && runner.arch != 'ARM64' && runner.os != 'macOS' }}
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/jax_tests/ -m precommit_jax_fe --junitxml=${INSTALL_TEST_DIR}/TEST-jax_fe.xml
Expand All @@ -230,22 +185,6 @@ jobs:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: TensorFlow 1 Layer Tests - Legacy FE
if: fromJSON(inputs.affected-components).TF_FE.test
run: python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_tests/test_tf_Roll.py --use_legacy_frontend --ir_version=10 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf_Roll.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: TensorFlow 2 Layer Tests - Legacy FE
# no longer workable since TF 2.17
# will be removed in 2024.5
if: ${{ 'false' }}
run: python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow2_keras_tests/test_tf2_keras_activation.py --use_legacy_frontend --ir_version=11 -k "sigmoid" --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_Activation.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: Clone API snippets
if: runner.os != 'macOS'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
Loading

0 comments on commit f6b83db

Please sign in to comment.