Adding support for custom ort tokenizer ops and ai.onnx.ml normalizer#34721
Conversation
|
@mvafin please review |
|
Please, fix python formatting. |
There was a problem hiding this comment.
Pull request overview
This PR aims to extend the ONNX frontend with (1) ai.onnx.ml Normalizer operator support and (2) improved guidance when encountering unsupported tokenizer-related ops by pointing users to OpenVINO Tokenizers extensions. It also adds new ONNX layer tests intended to cover these ops.
Changes:
- Add ai.onnx.ml
Normalizertranslator implementation and register it under theai.onnx.mldomain. - Add an additional error callback to surface “install openvino-tokenizers” guidance when specific tokenizer ops remain unconverted.
- Add new ONNX layer tests for Tokenizer / TfIdfVectorizer / StringNormalizer / LabelEncoder.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/layer_tests/onnx_tests/test_tokenizer.py | Adds a new nightly test for com.microsoft::Tokenizer (currently committed with invalid Python syntax). |
| tests/layer_tests/onnx_tests/test_tfidf_vectorizer.py | Adds a new nightly test for TfIdfVectorizer (currently committed with invalid Python syntax). |
| tests/layer_tests/onnx_tests/test_string_normalizer.py | Adds a new nightly test for StringNormalizer (currently committed with invalid Python syntax). |
| tests/layer_tests/onnx_tests/test_label_encoder.py | Adds a new nightly test for ai.onnx.ml::LabelEncoder (currently committed with invalid Python syntax). |
| src/frontends/onnx/frontend/src/ops_bridge.hpp | Declares helper to list tokenizer ops for error reporting. |
| src/frontends/onnx/frontend/src/ops_bridge.cpp | Defines AIONNX_ML_DOMAIN and implements get_supported_ops_via_tokenizers(). |
| src/frontends/onnx/frontend/src/frontend.cpp | Adds tokenizer-aware check_unconverted_ops additional callback messaging. |
| src/frontends/onnx/frontend/src/core/operator_set.hpp | Exposes AIONNX_ML_DOMAIN declaration. |
| src/frontends/onnx/frontend/src/op/ai.onnx.ml/normalizer.cpp | Adds translator for ai.onnx.ml::Normalizer (currently has correctness issues vs ONNX semantics). |
|
@mvafin can we please merge this PR |
|
@mvafin I have made clang format changes. Can you please restart the pipelines. |
|
@mvafin please start pipelines again |
|
@mvafin Please trigger ci/jenkins pipeline |
|
build_jenkins |
|
@openvinotoolkit/openvino-tests-maintainers Can you please review this PR |
mvafin
left a comment
There was a problem hiding this comment.
Please remove tests from tests/layer_tests/onnx_tests. They don't run and we cannot be sure if they are passing or not.
Details:
Tickets:
(https://jira.devtools.intel.com/browse/CVS-181364)
AI Assistance: