Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into concurent_release_mem
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnick committed Dec 12, 2024
2 parents 6875bf9 + 702ce05 commit bdb49ca
Show file tree
Hide file tree
Showing 1,071 changed files with 46,654 additions and 30,416 deletions.
4 changes: 4 additions & 0 deletions .github/actions/openvino_provider/get_s3_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def main(product, version_pattern, platform, arch, folder):
matching_files = filter_files_by_criteria(all_files, product, version_pattern, platform, arch, folder)
if matching_files:
logger.info(f"Matching packages: {sorted(matching_files)}")
if len(matching_files) > 1:
custom_release_build_pattern = fr".*/{version_pattern}/(linux_|windows_|macos_).*/.*"
# Exclude custom release builds, if any, from matches
matching_files = [file for file in matching_files if not re.search(custom_release_build_pattern, file)]
package_url = f"https://storage.openvinotoolkit.org{sorted(matching_files)[-1]}"
logger.info(f"Returning package URL: {package_url}")
action_utils.set_github_output("package_url", package_url)
Expand Down
1 change: 1 addition & 0 deletions .github/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ PyTorch_FE:
build:
- CPU
- Python_API
- TOKENIZERS # PyTorch_FE tests depend on tokenizers build

JAX_FE:
revalidate:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
name: Export workflow metrics (BETA)
name: Export workflow metrics

on:
workflow_run:
workflows:
- Android ARM64 with vcpkg
- Android x64
- Documentation
- Cleanup PIP caches
- Code snippets
- Code Style
- Code coverage
- Coverity (Ubuntu 20.04, Python 3.11)
- Debian 10 ARM
- Fedora 29 (RHEL 8.4), Python 3.9
- Linux (Ubuntu 20.04, Python 3.9)
- Linux (Ubuntu 22.04, Python 3.11)
- Linux (Ubuntu 24.04, Python 3.12)
- Linux ARM64 (Ubuntu 20.04, Python 3.11)
- Linux Static CC (Ubuntu 22.04, Python 3.11, Clang)
- Linux RISC-V with Conan (Ubuntu 22.04, Python 3.10)
- macOS (Python 3.11)
- macOS ARM64 (Python 3.11)
- MO
- Python API Checks
- Webassembly
- Windows (VS 2019, Python 3.11, Release)
- Windows (VS 2019, Python 3.11, Debug)
- Windows Conditional Compilation (VS 2022, Python 3.11)
- Rerun Workflow with Known Errors
- "Android ARM64 with vcpkg"
- "Android x64"
- "Cleanup caches"
- "Coverity (Ubuntu 20.04, Python 3.11)"
- "Debian 10 ARM"
- "Fedora 29 (RHEL 8.4), Python 3.9"
- "Linux (Ubuntu 20.04, Python 3.9)"
- "Linux (Ubuntu 22.04, Python 3.11)"
- "Linux (Ubuntu 24.04, Python 3.12)"
- "Linux ARM64 (Ubuntu 20.04, Python 3.11)"
- "Linux Static CC (Ubuntu 22.04, Python 3.11, Clang)"
- "Linux RISC-V with Conan (Ubuntu 22.04, Python 3.10)"
- "Linux (Ubuntu 22.04, Python 3.11, Intel DPC\\+\\+ Compiler)"
- "Linux CPU Plugin Snippets with LIBXSMM (Ubuntu 20.04)"
- "Linux Sanitizers (Ubuntu 20.04, Python 3.9)"
- "macOS (Python 3.11)"
- "macOS ARM64 (Python 3.11)"
- "Manylinux 2014"
- "Webassembly"
- "Windows (VS 2019, Python 3.11, Release)"
- "Windows (VS 2019, Python 3.11, Debug)"
- "Windows Conditional Compilation (VS 2022, Python 3.11)"
- "Rerun Workflow with Known Errors"
types:
- completed

permissions: read-all

jobs:
otel-export-trace:
export-workflow-metrics:
name: Export finished workflow metrics
runs-on: aks-linux-2-cores-8gb
if: ${{ github.repository_owner == 'openvinotoolkit' }}
Expand Down
142 changes: 142 additions & 0 deletions .github/workflows/job_python_api_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Python API tests

on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
container:
description: 'JSON to be converted to the value of the "container" configuration for the job'
type: string
required: false
default: '{"image": null}'
python-version:
description: 'Python version to setup. E.g., "3.11"'
type: string
required: true

permissions: read-all

env:
PIP_CACHE_PATH: /mount/caches/pip/linux

jobs:
Python_Unit_Tests:
name: Python API tests
timeout-minutes: 30
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
OPENVINO_REPO: ${{ github.workspace }}/openvino
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/openvino_tests
INSTALL_WHEELS_DIR: ${{ github.workspace }}/install/openvino_wheels
steps:
- name: Download OpenVINO artifacts (tarballs and wheels)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: openvino_@(wheels|tests)
path: ${{ env.INSTALL_DIR }}

# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/openvino_tests" >> "$GITHUB_ENV"
echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/openvino_wheels" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
run: brew install pigz

- name: Extract OpenVINO packages
run: pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_TEST_DIR}
working-directory: ${{ env.INSTALL_TEST_DIR }}

- name: Fetch setup_python and install wheels actions
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
.github/actions/install_ov_wheels/action.yml
sparse-checkout-cone-mode: false
path: 'action_root'

- name: Setup Python ${{ inputs.python-version }}
uses: ./action_root/.github/actions/setup_python
with:
version: ${{ inputs.python-version }}
pip-cache-path: ${{ runner.os == 'Linux' && env.PIP_CACHE_PATH || '' }}
should-setup-pip-paths: ${{ runner.os == 'Linux' }}
self-hosted-runner: ${{ runner.os == 'Linux' }}

#
# Tests
#
- name: Install OpenVINO Python wheels
uses: ./action_root/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
wheels-to-install: 'openvino'

- name: Install Python API tests dependencies
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/bindings/python/requirements_test.txt

#
# Tests
#

- name: Python API Tests
run: |
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH
python3 -m pytest -sv ${INSTALL_TEST_DIR}/tests/pyopenvino \
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \
--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py
- name: Python API Tests -- numpy>=2.0.0
run: |
python3 -m pip uninstall -y numpy
python3 -m pip install "numpy~=2.0.0"
python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/bindings/python/requirements_test.txt
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH
python3 -m pytest -sv ${INSTALL_TEST_DIR}/tests/pyopenvino \
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph_new_numpy.xml \
--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py
- name: Clone API snippets
if: runner.os != 'macOS'
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
sparse-checkout: docs/articles_en/assets/snippets
path: ${{ env.OPENVINO_REPO }}
submodules: 'false'

- name: Docs Python snippets
if: runner.os != 'macOS'
run: |
# torch, onnx
python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/python/preprocess/torchvision/requirements.txt -r ${INSTALL_TEST_DIR}/tests/requirements_onnx
# to find 'snippets' module in docs
export PYTHONPATH=${OPENVINO_REPO}/docs/articles_en/assets
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH
python3 ${OPENVINO_REPO}/docs/articles_en/assets/snippets/main.py
- name: Upload Test Results
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ !cancelled() }}
with:
name: test-results-python-api-${{ inputs.python-version }}
path: |
${{ env.INSTALL_TEST_DIR }}/TEST*.html
${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'warn'
54 changes: 8 additions & 46 deletions .github/workflows/job_python_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,22 @@ jobs:
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "LAYER_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/layer_tests" >> "$GITHUB_ENV"
echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
run: brew install pigz

- name: Extract OpenVINO packages
run: |
pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR}
run: pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR}
working-directory: ${{ env.INSTALL_DIR }}

- name: Fetch setup_python action
- name: Fetch setup_python and install wheels actions
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
.github/actions/install_ov_wheels/action.yml
sparse-checkout-cone-mode: false
path: 'action_root'

Expand All @@ -92,11 +93,10 @@ jobs:
self-hosted-runner: ${{ runner.os == 'Linux' }}

- name: Install OpenVINO Python wheels
run: |
# Install the core OV wheel
python3 -m pip install ./openvino-*.whl
working-directory: ${{ env.INSTALL_WHEELS_DIR }}
uses: ./action_root/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
wheels-to-install: 'openvino'

- name: Install Python API tests dependencies
run: |
Expand All @@ -121,15 +121,6 @@ jobs:
# Tests
#

- name: Python API Tests
if: ${{ fromJSON(inputs.affected-components).Python_API.test }}
run: |
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}:$LD_LIBRARY_PATH
python3 -m pytest -sv ${INSTALL_TEST_DIR}/pyopenvino \
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \
--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py
- name: Python ONNX operators tests
if: (fromJSON(inputs.affected-components).Python_API.test ||
fromJSON(inputs.affected-components).ONNX_FE.test) &&
Expand Down Expand Up @@ -185,35 +176,6 @@ jobs:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: Clone API snippets
if: runner.os != 'macOS'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: docs/articles_en/assets/snippets
path: ${{ env.OPENVINO_REPO }}
submodules: 'false'

- name: Docs Python snippets
if: runner.os != 'macOS'
run: |
# to find 'snippets' module in docs
export PYTHONPATH=${OPENVINO_REPO}/docs/articles_en/assets
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}:$LD_LIBRARY_PATH
python3 ${OPENVINO_REPO}/docs/articles_en/assets/snippets/main.py
- name: Python API Tests -- numpy>=2.0.0
if: ${{ fromJSON(inputs.affected-components).Python_API.test }}
run: |
python3 -m pip uninstall -y numpy
python3 -m pip install "numpy>=2.0.0,<2.2.0"
python3 -m pip install -r ${INSTALL_TEST_DIR}/bindings/python/requirements_test.txt
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}:$LD_LIBRARY_PATH
python3 -m pytest -sv ${INSTALL_TEST_DIR}/pyopenvino \
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \
--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py
- name: Upload Test Results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: ${{ !cancelled() }}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/job_samples_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "BUILD_DIR=$GITHUB_WORKSPACE/build" >> "$GITHUB_ENV"
echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
Expand All @@ -65,13 +66,12 @@ jobs:
pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR}
working-directory: ${{ env.INSTALL_DIR }}

- name: Fetch setup_python action
# Python is already installed on Ubuntu within Dockerfile
if: runner.os != 'Linux'
- name: Fetch setup_python and install wheels actions
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
.github/actions/install_ov_wheels/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'

Expand Down Expand Up @@ -113,6 +113,12 @@ jobs:
# Tests
#

- name: Install OpenVINO Python wheels
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
wheels-to-install: 'openvino'

- name: Samples tests
if: fromJSON(inputs.affected-components).samples.test
run: |
Expand All @@ -122,7 +128,7 @@ jobs:
export SHARE=$INSTALL_TEST_DIR/smoke_tests/samples_smoke_tests_data
# Install Python benchmark_app by installing openvino-*.whl
python3 -m pip install --ignore-installed PyYAML -r $INSTALL_TEST_DIR/smoke_tests/requirements.txt $INSTALL_WHEELS_DIR/openvino-*.whl
python3 -m pip install --ignore-installed PyYAML -r $INSTALL_TEST_DIR/smoke_tests/requirements.txt
export LD_LIBRARY_PATH=${IE_APP_PATH}:$LD_LIBRARY_PATH
source ${INSTALL_DIR}/setupvars.sh
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ jobs:
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
python-version: '3.11'

Python_API_Tests:
name: Python API tests
needs: [ Docker, Build, Smart_CI ]
uses: ./.github/workflows/job_python_api_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}", "volumes": ["/mount:/mount"]}'
python-version: '3.11'
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test

TensorFlow_Layer_Tests:
name: TensorFlow Layer Tests
needs: [ Build, Docker, Smart_CI, Openvino_tokenizers ]
Expand Down
Loading

0 comments on commit bdb49ca

Please sign in to comment.