Skip to content

Deprecated openvino.runtime imports cause DeprecationWarning in two demos #499

@Rishabh-Sahni-0809

Description

@Rishabh-Sahni-0809

Affected files:

  • ai_ref_kits/conversational_ai_chatbot/convert_and_optimize_chat.py (lines 6-7)
  • demos/virtual_ai_assistant_demo/main.py (lines 26-27)

Environment:

  • OpenVINO: 2025.x / 2026.0
  • Python: 3.9–3.12
  • OS: All

Problem:
Both files use bare openvino.runtime imports with no fallback:

from openvino.runtime import opset10 as ops
from openvino.runtime import passes

The openvino.runtime namespace was deprecated in OpenVINO 2025.2 and is
scheduled for removal in 2026.0. Unlike utils/notebook_utils.py which
wraps these in a try/except for backward compatibility, these files use
bare imports that will raise an ImportError on 2026.0 and currently
emit DeprecationWarning on 2025.x on every execution.

Expected behavior:
No deprecation warnings. Forward compatibility with 2026.0.

Proposed fix:

import openvino.opset10 as ops
from openvino import passes

I'm a GSoC 2026 applicant and would like to submit a fix for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions