Skip to content

Commit

Permalink
Merge branch 'openvinotoolkit:master' into issue17576
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhant-0707 authored Jan 29, 2024
2 parents 25ff7ba + 679ce62 commit c63e240
Show file tree
Hide file tree
Showing 5,295 changed files with 187,854 additions and 284,862 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/good_first_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ body:
discussions, guides.
value: |
- [Contribution guide - start here!](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING.md)
- [Intel DevHub Discord channel](https://discord.gg/7pVRxUwdWG) - engage in discussions, ask questions and talk to OpenVINO developers
validations:
required: true

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup_python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runs:

- if: ${{ runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && runner.arch != 'ARM64') }}
name: Setup Python ${{ inputs.version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.version }}
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/smart-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ inputs:
commit_sha:
description: "GitHub commit hash. Used if no PR number is set"
required: false
ref_name:
description: "GitHub ref name"
required: false
component_pattern:
description: "Pattern to extract component name from PR label. If not set, any label is considered a component name"
required: false
Expand Down Expand Up @@ -88,6 +91,7 @@ runs:
python ${{ github.action_path }}/smart_ci.py \
$([[ -n "${{ inputs.pr }}" ]] && echo '--pr ${{ inputs.pr }}' || echo '-s ${{ inputs.commit_sha }}') \
-r ${{ inputs.repository }} \
-f "${{ inputs.ref_name }}" \
-p "${{ inputs.component_pattern }}" \
-c "${{ inputs.components_config }}" \
-m "${{ inputs.components_config_schema }}" \
Expand Down
36 changes: 30 additions & 6 deletions .github/actions/smart-ci/smart_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,26 @@ def get_changed_component_names(pr, all_possible_components: set, component_patt
return components


def get_changeset(gh_api, pr, target_branch, commit_sha):
"""Returns changeset either from PR or commit"""
if pr:
return gh_api.pulls.list_files(pr)
if target_branch:
target_branch_head_commit = gh_api.repos.get_branch(target_branch).commit.sha
# In merge-queue branch all commits between head of target branch and head of current branch (commit_sha)
# contain changes added to queue earlier to be validated together. Getting all of them + changes from
# commit_sha below
changed_files = gh_api.repos.compare_commits(f'{target_branch_head_commit}...{commit_sha}').get('files', [])
return changed_files
raise ValueError(f'Either "pr" or "target_branch" parameter must be non-empty')


def parse_args():
parser = argparse.ArgumentParser(description='Returns product components changed in a given PR or commit')
parser.add_argument('--pr', type=int, required=False, help='PR number. If not set, --commit is used')
parser.add_argument('-s', '--commit-sha', required=False, help='Commit SHA. If not set, --pr is used')
parser.add_argument('-r', '--repo', help='GitHub repository')
parser.add_argument('-f', '--ref_name', required=False, help='GitHub ref name')
parser.add_argument('-p', '--pattern', default=None, help='Pattern to extract component name from PR label. '
'If not set, any label is considered a component name')
parser.add_argument('-c', '--components-config', default='.github/components.yml',
Expand Down Expand Up @@ -172,18 +187,27 @@ def main():
component_name = component_name_from_label(label, args.pattern)
all_possible_components.add(component_name if component_name else label)

no_match_files_changed = False
run_full_scope = False
# For now, we don't want to apply smart ci rules for post-commits
is_postcommit = not pr
if is_postcommit:

merge_queue_prefix = 'gh-readonly-queue/'
is_merge_queue = args.ref_name.startswith(merge_queue_prefix)
merge_queue_target_branch = re.findall(f'^{merge_queue_prefix}(.*)/', args.ref_name)[0] if is_merge_queue else None

if is_merge_queue:
logger.info(f"The run is a merge-queue run, executing full validation scope for all components, if "
f"not all queued changes match patterns in 'skip-when-only-listed-files-changed'")
run_full_scope = True
elif is_postcommit:
logger.info(f"The run is a post-commit run, executing full validation scope for all components")
run_full_scope = True
else:
no_match_files_changed = 'no-match-files' in [label.name for label in pr.labels]
if no_match_files_changed:
logger.info(f"There are changed files that don't match any pattern in labeler config, "
f"executing full validation scope for all components")

run_full_scope = is_postcommit or no_match_files_changed
run_full_scope = True

# In post-commits - validate all components regardless of changeset
# In pre-commits - validate only changed components with their dependencies
Expand All @@ -197,15 +221,15 @@ def main():
affected_components = cfg.get_affected_components(changed_component_names)

skip_workflow = False
if args.pr and not run_full_scope:
if is_merge_queue or (args.pr and not run_full_scope):
if args.skip_when_only_listed_labels_set:
excepted_labels = set(args.skip_when_only_listed_labels_set.split(','))
excepted_labels_only = changed_component_names - excepted_labels == set()
skip_workflow = excepted_labels_only

if not skip_workflow and args.skip_when_only_listed_files_changed:
# To avoid spending extra API requests running step below only if necessary
changed_files = gh_api.pulls.list_files(args.pr)
changed_files = get_changeset(gh_api, args.pr, merge_queue_target_branch, args.commit_sha)
patterns = set(args.skip_when_only_listed_files_changed.split(','))

matched_files_only = all(any(fnmatch(f.filename, pattern) for pattern in patterns) for f in changed_files)
Expand Down
3 changes: 3 additions & 0 deletions .github/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ IE_Tests:
- IR_FE

MO:
revalidate:
- PyTorch_FE
- TF_FE
build:
- Python_API

Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/android_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Android ARM64 with vcpkg
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- master
Expand Down Expand Up @@ -31,6 +32,7 @@ jobs:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
ref_name: ${{ github.ref_name }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
Expand All @@ -53,6 +55,10 @@ jobs:
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
SCCACHE_IGNORE_SERVER_IO_ERROR: 1
SCCACHE_SERVER_PORT: 35555
SCCACHE_ERROR_LOG: /__w/openvino/sccache_log.txt
SCCACHE_LOG: warn
OPENVINO_REPO: '/__w/openvino/openvino/openvino'
VCPKG_ROOT: '/__w/openvino/openvino/vcpkg'
BUILD_DIR: '/__w/openvino/openvino/build'
Expand Down Expand Up @@ -125,7 +131,7 @@ jobs:
- name: Install sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.5.4"
version: "v0.7.5"

#
# Build
Expand Down Expand Up @@ -171,6 +177,17 @@ jobs:
- name: Show ccache stats
run: ${SCCACHE_PATH} --show-stats

#
# Upload build logs
#
- name: Upload build logs
uses: actions/upload-artifact@v3
if: always()
with:
name: build_logs
path: ${{ env.SCCACHE_ERROR_LOG }}
if-no-files-found: 'ignore'

Overall_Status:
name: ci/gha_overall_status_android
needs: [Smart_CI, Build]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Documentation
on:
pull_request:
merge_group:

env:
DOXY_VER: '1.9.6'
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
- name: Cache documentation
id: cache_sphinx_docs
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build/docs/_build/.doctrees
key: sphinx-docs-cache
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ./src/bindings/python/requirements.txt
# Add for -DENABLE_PYTHON=ON, no cython
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 configure
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/requirements.txt
# For running Python API tests
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running Paddle frontend unit tests
python3 -m pip install -r ${{ github.workspace }}/src/frontends/paddle/tests/requirements.txt
# For running ONNX frontend unit tests
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
CMAKE_GENERATOR: 'Ninja Multi-Config'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
SCCACHE_IGNORE_SERVER_IO_ERROR: 1
SCCACHE_SERVER_PORT: 35555
GITHUB_WORKSPACE: '/__w/openvino/openvino'
OPENVINO_REPO: /__w/openvino/openvino/openvino
OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib
Expand Down Expand Up @@ -77,7 +79,7 @@ jobs:
- name: Install sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.5.4"
version: "v0.7.5"

- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
uses: actions/checkout@v4

- name: Dependency Review
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
with:
config-file: './.github/dependency_review.yml'
18 changes: 15 additions & 3 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Fedora (RHEL), Python 3.9
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- master
Expand Down Expand Up @@ -31,6 +32,7 @@ jobs:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
ref_name: ${{ github.ref_name }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
Expand All @@ -53,6 +55,10 @@ jobs:
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
SCCACHE_IGNORE_SERVER_IO_ERROR: 1
SCCACHE_SERVER_PORT: 35555
SCCACHE_ERROR_LOG: /__w/openvino/sccache_log.txt
SCCACHE_LOG: warn
GITHUB_WORKSPACE: '/__w/openvino/openvino'
OPENVINO_REPO: /__w/openvino/openvino/openvino
INSTALL_DIR: /__w/openvino/openvino/openvino_install
Expand Down Expand Up @@ -87,14 +93,13 @@ jobs:
- name: Install sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.5.4"
version: "v0.7.5"

- name: Install python dependencies
run: |
python3 -m pip install -U pip
# For Python API: build and wheel packaging
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt
Expand Down Expand Up @@ -161,8 +166,15 @@ jobs:
cmake --build ${BUILD_DIR} --parallel --target package --verbose
#
# Upload build artifacts
# Upload build artifacts and logs
#
- name: Upload build logs
uses: actions/upload-artifact@v3
if: always()
with:
name: build_logs
path: ${{ env.SCCACHE_ERROR_LOG }}
if-no-files-found: 'ignore'

- name: Upload openvino package
if: ${{ always() }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/job_cpu_functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
PARALLEL_TEST_SCRIPT: ${{ github.workspace }}/install/tests/functional_test_utils/layer_tests_summary/run_parallel.py
PARALLEL_TEST_CACHE: ${{ github.workspace }}/install/tests/test_cache.lst
if: ${{ github.event_name != 'merge_group' }}
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v3
Expand All @@ -55,7 +56,7 @@ jobs:
pushd $INSTALL_DIR
tar -xzf openvino_package.tar.gz -C $INSTALL_DIR
popd
pushd $INSTALL_TEST_DIR
tar -xzf openvino_tests.tar.gz -C $INSTALL_DIR
popd
Expand Down Expand Up @@ -83,7 +84,7 @@ jobs:
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/functional_test_utils/layer_tests_summary/requirements.txt

- name: Restore tests execution time
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ${{ env.PARALLEL_TEST_CACHE }}
key: ${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp-${{ github.sha }}
Expand All @@ -96,20 +97,20 @@ jobs:
if [[ -f "${INSTALL_DIR}/setupvars.sh" ]]; then
source ${INSTALL_DIR}/setupvars.sh
fi
python3 ${PARALLEL_TEST_SCRIPT} -e ${INSTALL_TEST_DIR}/ov_cpu_func_tests -c ${PARALLEL_TEST_CACHE} -w ${INSTALL_TEST_DIR} -s suite -rf 0 -- --gtest_print_time=1 --gtest_filter=*smoke*
timeout-minutes: 20
timeout-minutes: 25

- name: Save tests execution time
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: github.ref_name == 'master'
with:
path: ${{ env.PARALLEL_TEST_CACHE }}
key: ${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp-${{ github.sha }}

- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
if: always()
with:
name: test-results-functional-cpu
path: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/job_cxx_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Samples
name: C++ Unit Tests

on:
workflow_call:
Expand Down Expand Up @@ -31,6 +31,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
if: ${{ github.event_name != 'merge_group' }}
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/job_onnx_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
ONNX_MODELS_PATH: ${{ github.workspace }}/onnx_test_models
MODELS_SHARE_PATH: "/mount/onnxtestdata"
ONNX_MODEL_ZOO_SHA: "d58213534f2a4d1c4b19ba62b3bb5f544353256e"
if: ${{ github.event_name != 'merge_group' }}
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -103,4 +104,4 @@ jobs:
python3 -m pip install pytest-xdist[psutil] pytest-forked
- name: ONNX Models Tests
run: python3 -m pytest --backend="CPU" --model_zoo_dir="${MODELS_SHARE_PATH}" ${INSTALL_TEST_DIR}/onnx/tests/tests_python/test_zoo_models.py -v -n 12 --forked -k 'not _cuda' --model_zoo_xfail
run: python3 -m pytest --backend="CPU" --model_zoo_dir="${MODELS_SHARE_PATH}" ${INSTALL_TEST_DIR}/onnx/tests/tests_python/test_zoo_models.py -v -n auto --forked -k 'not _cuda' --model_zoo_xfail
Loading

0 comments on commit c63e240

Please sign in to comment.