Skip to content

Commit

Permalink
Merge branch 'master' into toml_build
Browse files Browse the repository at this point in the history
  • Loading branch information
mryzhov authored Nov 14, 2024
2 parents 8645410 + 19ae2a9 commit 16c1c73
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 32 deletions.
1 change: 1 addition & 0 deletions .github/actions/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class EventType(Enum):
'public_linux_ubuntu_24_04_x86_64_release',
'public_windows_vs2019_Release',
'public_windows_vs2019_Debug',
'public_manylinux2014_x86_64_release',
)
ProductType = Enum('ProductType', {t.upper(): t for t in productTypes})

Expand Down
47 changes: 46 additions & 1 deletion .github/workflows/manylinux_2014.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING -e DOCKER_CONFIG -v ${{ github.workspace }}:${{ github.workspace }}
env:
CMAKE_BUILD_TYPE: 'Release'
ARCH: 'x86_64'
OPENVINO_REPO: ${{ github.workspace }}/src
INSTALL_DIR: ${{ github.workspace }}/install/openvino
INSTALL_WHEELS_DIR: ${{ github.workspace }}/install/wheels
Expand All @@ -99,6 +100,9 @@ jobs:
SCCACHE_SERVER_PORT: 35555
SCCACHE_CACHE_SIZE: 50G
SCCACHE_AZURE_KEY_PREFIX: manylinux_2014
ARTIFACTS_SHARE: "/mount/build-artifacts"
MANIFEST_PATH: ${{ github.workspace }}/manifest.yml
PRODUCT_TYPE: public_manylinux2014_x86_64_release

steps:
- name: Clone OpenVINO
Expand All @@ -109,6 +113,17 @@ jobs:

- name: System info
uses: ./src/.github/actions/system_info

- name: Generate product manifest and set CI_BUILD_NUMBER & CI_BUILD_DEV_TAG
id: create_manifest
uses: ./src/.github/actions/create_manifest
with:
repos: |
${{ env.OPENVINO_REPO }}
product_type: ${{ env.PRODUCT_TYPE }}
target_arch: ${{ env.ARCH }}
build_type: ${{ env.CMAKE_BUILD_TYPE }}
save_to: ${{ env.MANIFEST_PATH }}

- name: Create docker build cache
run: |
Expand All @@ -128,6 +143,8 @@ jobs:
-e SCCACHE_AZURE_KEY_PREFIX \
-e CMAKE_CXX_COMPILER_LAUNCHER \
-e CMAKE_C_COMPILER_LAUNCHER \
-e CI_BUILD_NUMBER \
-e CI_BUILD_DEV_TAG \
-w /work/src \
${{ fromJSON(needs.docker.outputs.images).ov_build.manylinux2014_x86_64 }} \
/bin/bash -c "
Expand Down Expand Up @@ -158,6 +175,8 @@ jobs:
-e SCCACHE_AZURE_KEY_PREFIX \
-e CMAKE_CXX_COMPILER_LAUNCHER \
-e CMAKE_C_COMPILER_LAUNCHER \
-e CI_BUILD_NUMBER \
-e CI_BUILD_DEV_TAG \
-w /work/src \
${{ fromJSON(needs.docker.outputs.images).ov_build.manylinux2014_x86_64 }} \
/bin/bash -c "
Expand Down Expand Up @@ -188,4 +207,30 @@ jobs:
with:
name: openvino_wheels
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'
if-no-files-found: 'error'

- name: Store artifacts to a shared drive
id: store_artifacts
if: ${{ always() }}
uses: ./src/.github/actions/store_artifacts
with:
artifacts: |
${{ env.BUILD_DIR }}/openvino_package.tar.gz
${{ env.MANIFEST_PATH }}
${{ env.INSTALL_WHEELS_DIR }}/wheels
storage_dir: ${{ env.PRODUCT_TYPE }}
storage_root: ${{ env.ARTIFACTS_SHARE }}

Overall_Status:
name: ci/gha_overall_status_manylinux2014
needs: [Smart_CI, Build]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1
14 changes: 7 additions & 7 deletions tools/ovc/openvino/tools/ovc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

from openvino.tools.ovc.convert import convert_model
from openvino.tools.ovc.telemetry_utils import is_optimum, init_mo_telemetry
from openvino.tools.ovc.telemetry_utils import is_optimum, init_ovc_telemetry

import importlib.metadata as importlib_metadata

Expand All @@ -11,10 +11,10 @@
except importlib_metadata.PackageNotFoundError:
optimum_version = None

from openvino.runtime import get_version as get_rt_version # pylint: disable=no-name-in-module,import-error
telemetry = init_ovc_telemetry('OpenVINO')
telemetry.send_event("ov", "import", "general_import")

if is_optimum() and optimum_version is not None:
from openvino.runtime import get_version as get_rt_version # pylint: disable=no-name-in-module,import-error
telemetry = init_mo_telemetry("Optimum Intel", optimum_version)
telemetry.send_event("ov", "import", "import_from_optimum,ov_version:{}".format(get_rt_version()))
else:
telemetry = init_mo_telemetry()
telemetry.send_event("ov", "import", "general_import")
telemetry = init_ovc_telemetry("Optimum Intel", optimum_version)
telemetry.send_event("optimum", "import", "import_from_optimum,ov_version:{}".format(get_rt_version()))
4 changes: 2 additions & 2 deletions tools/ovc/openvino/tools/ovc/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys

from openvino.tools.ovc.main import main
from openvino.tools.ovc.telemetry_utils import init_mo_telemetry
from openvino.tools.ovc.telemetry_utils import init_ovc_telemetry

init_mo_telemetry()
init_ovc_telemetry()
sys.exit(main())
10 changes: 5 additions & 5 deletions tools/ovc/openvino/tools/ovc/convert_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from openvino.tools.ovc.utils import check_values_equal
from openvino.tools.ovc.logger import init_logger
from openvino.tools.ovc.telemetry_utils import send_params_info, send_conversion_result, \
init_mo_telemetry
init_ovc_telemetry
from openvino.tools.ovc.moc_frontend.pytorch_frontend_utils import get_pytorch_decoder, \
extract_input_info_from_example, get_pytorch_decoder_for_model_on_disk
from openvino.tools.ovc.moc_frontend.paddle_frontend_utils import paddle_frontend_converter
Expand Down Expand Up @@ -428,7 +428,7 @@ def _convert(cli_parser: argparse.ArgumentParser, args, python_api_used):
tracemalloc.start()

simplified_ie_version = VersionChecker().get_ie_simplified_version()
telemetry = init_mo_telemetry()
telemetry = init_ovc_telemetry()
telemetry.start_session('ovc')
telemetry.send_event('ovc', 'version', simplified_ie_version)
# Initialize logger with 'ERROR' as default level to be able to form nice messages
Expand Down Expand Up @@ -484,12 +484,12 @@ def _convert(cli_parser: argparse.ArgumentParser, args, python_api_used):

argv.feManager = FrontEndManager()

# send telemetry with params info
send_params_info(argv, cli_parser)

non_default_params = get_non_default_params(argv, cli_parser)
argv.is_python_api_used = python_api_used

# send telemetry with params info
send_params_info(non_default_params)

argv.framework = model_framework

orig_input_model = argv.input_model
Expand Down
4 changes: 2 additions & 2 deletions tools/ovc/openvino/tools/ovc/ovc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import sys

if __name__ == "__main__":
from openvino.tools.ovc.telemetry_utils import init_mo_telemetry
from openvino.tools.ovc.telemetry_utils import init_ovc_telemetry
from openvino.tools.ovc.main import main

init_mo_telemetry()
init_ovc_telemetry()
sys.exit(main())
27 changes: 12 additions & 15 deletions tools/ovc/openvino/tools/ovc/telemetry_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def is_optimum():
return False


def init_mo_telemetry(app_name='Model Conversion API', app_version=None):
def init_ovc_telemetry(app_name='OVC', app_version=None):
app_version = app_version if app_version is not None else get_rt_version()
return init_telemetry_class(tid=get_tid(),
app_name=app_name,
Expand Down Expand Up @@ -97,22 +97,19 @@ def arg_to_str(arg):
return str(type(arg))


def send_params_info(argv: argparse.Namespace, cli_parser: argparse.ArgumentParser):
def send_params_info(params: dict):
"""
This function sends information about used command line parameters.
:param argv: command line parameters.
:param cli_parser: command line parameters parser.
:param params: command-line parameters dictionary.
"""
t = tm.Telemetry()
params_with_paths = get_params_with_paths_list()
for arg in vars(argv):
arg_value = getattr(argv, arg)
if not check_values_equal(arg_value, cli_parser.get_default(arg)):
if arg in params_with_paths:
# If command line argument value is a directory or a path to file it is not sent
# as it may contain confidential information. "1" value is used instead.
param_str = arg + ":" + str(1)
else:
param_str = arg + ":" + arg_to_str(arg_value)

t.send_event('ovc', 'cli_parameters', param_str)
for key, value in params.items():
if key in params_with_paths:
# If command line argument value is a directory or a path to file it is not sent
# as it may contain confidential information. "1" value is used instead.
param_str = key + ":" + str(1)
else:
param_str = key + ":" + arg_to_str(value)

t.send_event('ovc', 'cli_parameters', param_str)

0 comments on commit 16c1c73

Please sign in to comment.