[MO] Print information about new API 2.0 (#10567)

* [MO] Print information about new API 2.0

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
This commit is contained in:
Roman Kazantsev 2022-02-22 16:54:20 +03:00 committed by GitHub
parent aced89a655
commit bc0a84a1c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -34,7 +34,7 @@ from openvino.tools.mo.utils.cli_parser import check_available_transforms, get_c
get_placeholder_shapes, get_tf_cli_options, get_tuple_values, parse_transform, parse_tuple_pairs
from openvino.tools.mo.utils.error import Error, FrameworkError
from openvino.tools.mo.utils.find_ie_version import find_ie_version
from openvino.tools.mo.utils.get_ov_update_message import get_ov_update_message
from openvino.tools.mo.utils.get_ov_update_message import get_ov_update_message, get_ov_api20_message
from openvino.tools.mo.utils.guess_framework import deduce_legacy_frontend_by_namespace
from openvino.tools.mo.utils.logger import init_logger, progress_printer
from openvino.tools.mo.utils.model_analysis import AnalysisResults
@ -523,11 +523,15 @@ def main(cli_parser: argparse.ArgumentParser, fem: FrontEndManager, framework: s
argv.feManager = fem
ov_update_message = None
ov_api20_message = None
if not hasattr(argv, 'silent') or not argv.silent:
ov_update_message = get_ov_update_message()
ov_api20_message = get_ov_api20_message()
ret_code = driver(argv)
if ov_update_message:
print(ov_update_message)
if ov_api20_message and ret_code == 0:
print(ov_api20_message)
telemetry.send_event('mo', 'conversion_result', 'success')
telemetry.end_session('mo')
telemetry.force_shutdown(1.0)

View File

@ -14,3 +14,13 @@ def get_ov_update_message():
link = 'https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html?cid=other&source=prod&campid=ww_2022_bu_IOTG_OpenVINO-2022-1&content=upg_all&medium=organic'
return msg_fmt.format(link) if current_date >= expected_update_date else None
def get_ov_api20_message():
link = "https://docs.openvino.ai"
message = '[ INFO ] The model was converted to IR v11, the latest model format that corresponds to the source DL framework ' \
'input/output format. While IR v11 is backwards compatible with OpenVINO Inference Engine API v1.0, ' \
'please use API v2.0 (as of 2022.1) to take advantage of the latest improvements in IR v11.\n' \
'Find more information about API v2.0 and IR v11 at {}'.format(link)
return message