diff --git a/tools/ovc/openvino/tools/ovc/__init__.py b/tools/ovc/openvino/tools/ovc/__init__.py index 25d8b28298f5c9..db0c2e84309598 100644 --- a/tools/ovc/openvino/tools/ovc/__init__.py +++ b/tools/ovc/openvino/tools/ovc/__init__.py @@ -3,7 +3,7 @@ import sys from openvino.tools.ovc.convert import convert_model -from openvino.tools.ovc.telemetry_utils import is_optimum, init_ovc_telemetry, is_torch_compile +from openvino.tools.ovc.telemetry_utils import is_optimum, init_ovc_telemetry, is_torch_compile, is_keras3 import importlib.metadata as importlib_metadata @@ -24,3 +24,8 @@ torch_version = importlib_metadata.version("torch") telemetry = init_ovc_telemetry("torch.compile", torch_version) telemetry.send_event("torch.compile", "import", "Import from torch.compile(), ov_version: {}".format(get_rt_version())) + +if is_keras3() and 'keras' in sys.modules: + keras_version = importlib_metadata.version("keras") + telemetry = init_ovc_telemetry("keras3", keras_version) + telemetry.send_event("keras3", "import", "Import from keras3, ov_version: {}".format(get_rt_version())) diff --git a/tools/ovc/openvino/tools/ovc/telemetry_utils.py b/tools/ovc/openvino/tools/ovc/telemetry_utils.py index a2cc8dab2cf49b..aaa2080cca9c89 100644 --- a/tools/ovc/openvino/tools/ovc/telemetry_utils.py +++ b/tools/ovc/openvino/tools/ovc/telemetry_utils.py @@ -31,6 +31,13 @@ def is_torch_compile(): return True return False +def is_keras3(): + import traceback + for line in traceback.format_stack(): + if os.path.join("keras", "src", "backend", "openvino") in line: + return True + return False + 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(),