Skip to content

🔨Update imports causing import warnings #2698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rajeshgangireddy
Copy link
Contributor

@rajeshgangireddy rajeshgangireddy commented May 12, 2025

📝 Description

openvino.runtime is deprecated and keeps throwing warnings making the cli look "ugly".
There is also a deprecating warning from timm.model.layers used by an older version of open-clip. In this pr, open-clip is updated as well to prevent timm.model.layer import warnings.

✨ Changes

Select what type of change your PR is:

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔨 Refactor (non-breaking change which refactors the code base)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔒 Security update

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📋 I have summarized my changes in the CHANGELOG and followed the guidelines for my type of change (skip for minor changes, documentation updates, and test enhancements).
  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).

For more information about code review checklists, see the Code Review Checklist.

Copy link
Contributor

@samet-akcay samet-akcay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @rajeshgangireddy, two minor comments.

# torch.onnx.errors.UnsupportedOperatorError: Exporting the operator
# 'aten::_native_multi_head_attention' to ONNX opset version 14 is not supported
"open-clip-torch>=2.23.0,<2.26.1",
"open-clip-torch>=2.32.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think vlm model was broken when we installed >2.32.0. @ashwinvaidya17, can you confirm?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is where the tests fail when we use a newer clip version

FAILED tests/integration/model/test_models.py::TestAPI::test_export[onnx-win_clip] - torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::_native_multi_head_attention' to ONNX opset version 14 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.
FAILED tests/integration/model/test_models.py::TestAPI::test_export[openvino-win_clip] - torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::_native_multi_head_attention' to ONNX opset version 14 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.
===== 2 failed, 182 passed, 16 skipped, 972 warnings in 1506.18s (0:25:06) =====

@@ -56,7 +56,7 @@
import numpy as np
import torch
from lightning_utilities.core.imports import module_available
from openvino.runtime.utils.data_helpers.wrappers import OVDict
from openvino.utils.data_helpers.wrappers import OVDict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see OVDict is only used for annotation. Maybe we could have the import something like this

if TYPE_CHECKING:
    from openvino.utils.data_helpers.wrappers import OVDict

....

def post_process(predictions: "OVDict") -> dict:

@samet-akcay
Copy link
Contributor

@rajeshgangireddy, I've merged #2719, so we can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to cancel warnings
2 participants