Skip to content

Adding support for custom ort tokenizer ops and ai.onnx.ml normalizer#34721

Merged
sfatimar merged 26 commits into
openvinotoolkit:masterfrom
sfatimar:add_normalizer_ovtokenizer_ops
May 1, 2026
Merged

Adding support for custom ort tokenizer ops and ai.onnx.ml normalizer#34721
sfatimar merged 26 commits into
openvinotoolkit:masterfrom
sfatimar:add_normalizer_ovtokenizer_ops

Conversation

@sfatimar

Copy link
Copy Markdown
Contributor

Details:

  • Add support for Custom OpenVINO Tokenizer Ops
  • Add support for ONNX ai.onnx.ml Op Normalizer

Tickets:

(https://jira.devtools.intel.com/browse/CVS-181364)

AI Assistance:

  • yes
  • gnai-intel used to guide in writing code.

@sfatimar sfatimar requested a review from a team as a code owner March 16, 2026 08:46
@github-actions github-actions Bot added the category: ONNX FE OpenVINO ONNX FrontEnd label Mar 16, 2026
@sys-openvino-ci sys-openvino-ci added the ExternalIntelPR External contributor from Intel label Mar 16, 2026
@sfatimar sfatimar marked this pull request as draft March 16, 2026 09:48
@sfatimar sfatimar marked this pull request as ready for review March 30, 2026 06:10
@sfatimar sfatimar requested review from a team as code owners March 30, 2026 06:10
@sfatimar

Copy link
Copy Markdown
Contributor Author

@mvafin please review

@apaniukov

Copy link
Copy Markdown
Contributor

Please, fix python formatting.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Normalizer translator implementation and register it under the ai.onnx.ml domain.
  • 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).

Comment thread tests/layer_tests/onnx_tests/test_tokenizer.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_tfidf_vectorizer.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_string_normalizer.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_label_encoder.py Outdated
Comment thread src/frontends/onnx/frontend/src/op/ai.onnx.ml/normalizer.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Comment thread tests/layer_tests/onnx_tests/test_tfidf_vectorizer.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_label_encoder.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_string_normalizer.py Outdated
Comment thread src/frontends/onnx/frontend/src/op/ai.onnx.ml/normalizer.cpp Outdated
Comment thread src/frontends/onnx/frontend/src/op/ai.onnx.ml/normalizer.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Comment thread tests/layer_tests/onnx_tests/test_label_encoder.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_label_encoder.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_string_normalizer.py Outdated
Comment thread tests/layer_tests/onnx_tests/test_tfidf_vectorizer.py Outdated
Comment thread src/frontends/onnx/frontend/src/op/ai.onnx.ml/normalizer.cpp Outdated
@sfatimar

sfatimar commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

@mvafin can we please merge this PR

@sfatimar

sfatimar commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@mvafin I have made clang format changes. Can you please restart the pipelines.

@sfatimar sfatimar requested a review from a team as a code owner April 9, 2026 04:30
@sfatimar sfatimar requested review from kblaszczak-intel and removed request for a team April 9, 2026 04:30
@github-actions github-actions Bot added the category: docs OpenVINO documentation label Apr 9, 2026
@sfatimar

sfatimar commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

@mvafin please start pipelines again

@RajeevSekar

Copy link
Copy Markdown
Contributor

@mvafin Please trigger ci/jenkins pipeline

@mvafin

mvafin commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

build_jenkins

@sfatimar

Copy link
Copy Markdown
Contributor Author

@openvinotoolkit/openvino-tests-maintainers Can you please review this PR

@mvafin mvafin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove tests from tests/layer_tests/onnx_tests. They don't run and we cannot be sure if they are passing or not.

@sfatimar sfatimar enabled auto-merge April 28, 2026 14:01
@sfatimar sfatimar disabled auto-merge April 28, 2026 15:50
@sfatimar sfatimar added this pull request to the merge queue May 1, 2026
Merged via the queue into openvinotoolkit:master with commit 858ff7c May 1, 2026
203 checks passed
@sfatimar sfatimar deleted the add_normalizer_ovtokenizer_ops branch May 1, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build OpenVINO cmake script / infra category: docs OpenVINO documentation category: ONNX FE OpenVINO ONNX FrontEnd ExternalIntelPR External contributor from Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants