Skip to content
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

Add support for ai.onnx.ml.TreeEnsemble.v5 #21851

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

bili2002
Copy link

@bili2002 bili2002 commented Aug 25, 2024

Description

This PR adds support for the TreeEnsemble operator added in version 5 of the ai.onnx.ml opset. The solution maps the values of the attributes of the v5 operator into attributes of the already supported version 3. Whereas, the membership_values are unrolled into chains of BRANCH_EQ nodes.

Note that the changes made in #21222 may roll up these BRANCH_EQ chains into a single node again to retain efficient support for categorical features.

Ultimately, it may be desirable to have an implementation that directly uses the v5 attributes. However, mapping the v5 attributes into the v3 layout appears to be an easier first step to gaining initial support for the v5 operator.

Motivation and Context

Solves onnx/onnx#5874.

Copy link
Contributor

@cbourjau cbourjau left a comment

Choose a reason for hiding this comment

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

Thanks for taking on this complex task! I have a few minor comments at this point.

onnxruntime/core/providers/cpu/ml/tree_ensemble.h Outdated Show resolved Hide resolved
onnxruntime/core/providers/cpu/ml/tree_ensemble.h Outdated Show resolved Hide resolved
@bili2002 bili2002 marked this pull request as ready for review August 28, 2024 16:50
@cbourjau
Copy link
Contributor

@xadupre could you maybe take a look at this?

@xadupre
Copy link
Member

xadupre commented Sep 18, 2024

Can you look into the failing build? The compilation fails on Windows because a warning is treated as an error (usually an implicit cast to change into a static_cast<...>(...).

@xadupre
Copy link
Member

xadupre commented Sep 20, 2024

/azp run inux CPU CI Pipeline,Windows CPU CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

3 participants