From fefe0c33e02928d85646a940fe854d39186461a3 Mon Sep 17 00:00:00 2001 From: Anastasiia Pnevskaia Date: Thu, 14 Nov 2024 16:38:44 +0100 Subject: [PATCH 1/2] Fixed OVC app name in telemetry. (#27544) ### Details: - Fixed the issue, that '`Model Conversion API`' telemetry category includes `OVC` and all other tools, now `OVC` has a separate category "`OVC`". - Refactored `send_params_info()` method and fixed naming of telemetry init method. --------- Co-authored-by: Roman Kazantsev --- tools/ovc/openvino/tools/ovc/__init__.py | 14 +++++----- tools/ovc/openvino/tools/ovc/__main__.py | 4 +-- tools/ovc/openvino/tools/ovc/convert_impl.py | 10 +++---- tools/ovc/openvino/tools/ovc/ovc.py | 4 +-- .../ovc/openvino/tools/ovc/telemetry_utils.py | 27 +++++++++---------- 5 files changed, 28 insertions(+), 31 deletions(-) diff --git a/tools/ovc/openvino/tools/ovc/__init__.py b/tools/ovc/openvino/tools/ovc/__init__.py index a2912d28e08af7..5b750b58969d24 100644 --- a/tools/ovc/openvino/tools/ovc/__init__.py +++ b/tools/ovc/openvino/tools/ovc/__init__.py @@ -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 @@ -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())) diff --git a/tools/ovc/openvino/tools/ovc/__main__.py b/tools/ovc/openvino/tools/ovc/__main__.py index 5e9ef2dfba4e6f..d264010d9870d9 100644 --- a/tools/ovc/openvino/tools/ovc/__main__.py +++ b/tools/ovc/openvino/tools/ovc/__main__.py @@ -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()) diff --git a/tools/ovc/openvino/tools/ovc/convert_impl.py b/tools/ovc/openvino/tools/ovc/convert_impl.py index dc0694f0a405b5..aef054f8aafc24 100644 --- a/tools/ovc/openvino/tools/ovc/convert_impl.py +++ b/tools/ovc/openvino/tools/ovc/convert_impl.py @@ -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 @@ -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 @@ -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 diff --git a/tools/ovc/openvino/tools/ovc/ovc.py b/tools/ovc/openvino/tools/ovc/ovc.py index 20c4a675797a92..88f2d7a08619be 100755 --- a/tools/ovc/openvino/tools/ovc/ovc.py +++ b/tools/ovc/openvino/tools/ovc/ovc.py @@ -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()) diff --git a/tools/ovc/openvino/tools/ovc/telemetry_utils.py b/tools/ovc/openvino/tools/ovc/telemetry_utils.py index 4a54632b8c642d..412d9b9607541e 100644 --- a/tools/ovc/openvino/tools/ovc/telemetry_utils.py +++ b/tools/ovc/openvino/tools/ovc/telemetry_utils.py @@ -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, @@ -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) From 19ae2a950d0127a60d66a6e46b55c91faf07d736 Mon Sep 17 00:00:00 2001 From: Mikhail Ryzhov Date: Thu, 14 Nov 2024 17:20:56 +0100 Subject: [PATCH 2/2] [GHA] Manylinux added CI tags and manifest (#27540) ### Details: - added actions to save artifacts for Jenkins - create_manifest and store_artifacts - Added overall status workflow ### Tickets: - *ticket-id* --- .github/actions/common/constants.py | 1 + .github/workflows/manylinux_2014.yml | 47 +++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.github/actions/common/constants.py b/.github/actions/common/constants.py index da55ece2ee4258..6a1d165fc7df13 100644 --- a/.github/actions/common/constants.py +++ b/.github/actions/common/constants.py @@ -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}) diff --git a/.github/workflows/manylinux_2014.yml b/.github/workflows/manylinux_2014.yml index ed375fb868459f..bd5da965226a50 100644 --- a/.github/workflows/manylinux_2014.yml +++ b/.github/workflows/manylinux_2014.yml @@ -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 @@ -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 @@ -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: | @@ -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 " @@ -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 " @@ -188,4 +207,30 @@ jobs: with: name: openvino_wheels path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl - if-no-files-found: 'error' \ No newline at end of file + 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 \ No newline at end of file