-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Label encoder with tensor attributes #5453
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
Label encoder with tensor attributes #5453
Conversation
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Would it be possible to add a test case in folder https://github.com/onnx/onnx/tree/main/onnx/backend/test/case/node/ai_onnx_ml? |
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR. One minor comment/nit left in the review.
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
…tyagoel4512/onnx into label_encoder_with_tensor_attributes Signed-off-by: Aditya Goel <agoel4512@gmail.com>
9bd2062
to
750af66
Compare
Signed-off-by: Aditya Goel <agoel4512@gmail.com>
a04a822
to
45eac0f
Compare
Great, if resolved now can this be added to the merge queue please |
### Description In #5453, we should have added support for double inputs. This PR adds double input tensor support. --------- Signed-off-by: Aditya Goel <agoel4512@gmail.com> Signed-off-by: Aditya Goel <48102515+adityagoel4512@users.noreply.github.com>
### Description <!-- - Describe your changes. --> This PR adds `keys_as_tensor` and `values_as_tensor` attributes as discussed in onnx#5412. This is intended to be in line with the approach followed when introducing tensor attributes to operators previously like TreeEnsemble* operators so converter libraries require no code change. This requires a bump to `ai.onnx.ml` opset 4. Shape inference tests can also now be applied across versions for `ai.onnx.ml` operators. Previously this only worked for the default domain. In this new version of the LabelEncoder, `int32_t` and `int16_t` types are also proposed but no additional `keys_*`/`values_*` attributes are added. ### Motivation and Context Closes onnx#5412. --------- Signed-off-by: Aditya Goel <agoel4512@gmail.com> Signed-off-by: Aditya Goel <48102515+adityagoel4512@users.noreply.github.com> Signed-off-by: Corwin Joy <corwinjoy@gmail.com>
### Description In onnx#5453, we should have added support for double inputs. This PR adds double input tensor support. --------- Signed-off-by: Aditya Goel <agoel4512@gmail.com> Signed-off-by: Aditya Goel <48102515+adityagoel4512@users.noreply.github.com> Signed-off-by: Corwin Joy <corwinjoy@gmail.com>
### Description <!-- - Describe your changes. --> This PR adds `keys_as_tensor` and `values_as_tensor` attributes as discussed in onnx#5412. This is intended to be in line with the approach followed when introducing tensor attributes to operators previously like TreeEnsemble* operators so converter libraries require no code change. This requires a bump to `ai.onnx.ml` opset 4. Shape inference tests can also now be applied across versions for `ai.onnx.ml` operators. Previously this only worked for the default domain. In this new version of the LabelEncoder, `int32_t` and `int16_t` types are also proposed but no additional `keys_*`/`values_*` attributes are added. ### Motivation and Context Closes onnx#5412. --------- Signed-off-by: Aditya Goel <agoel4512@gmail.com> Signed-off-by: Aditya Goel <48102515+adityagoel4512@users.noreply.github.com> Signed-off-by: Corwin Joy <corwinjoy@gmail.com>
### Description In onnx#5453, we should have added support for double inputs. This PR adds double input tensor support. --------- Signed-off-by: Aditya Goel <agoel4512@gmail.com> Signed-off-by: Aditya Goel <48102515+adityagoel4512@users.noreply.github.com> Signed-off-by: Corwin Joy <corwinjoy@gmail.com>
### Description In onnx#5453, we should have added support for double inputs. This PR adds double input tensor support. --------- Signed-off-by: Aditya Goel <agoel4512@gmail.com> Signed-off-by: Aditya Goel <48102515+adityagoel4512@users.noreply.github.com> Signed-off-by: Corwin Joy <corwinjoy@gmail.com>
@adityagoel4512 , thank you for contributing to ONNX. Now I am preparing ONNX 1.15.0 release and integrating the release with ORT, I wonder if you have a plan to implement the runtime kernel for this updated op in ORT? If so, I will let you know once ORT has ONNX 1.15.0 integrated. Thank you in advance. |
Hi @liqunfu. Yes, I intend to implement the runtime kernels once ORT integrates the new ONNX release. I would appreciate being notified once this is possible. |
@adityagoel4512 , onnx rel-1.15.0 branch is in ORT now. (microsoft/onnxruntime#17125). @skottmckay has mentioned to me that There are also regex and string manipulation ops in onnxruntime-extensions: onnxruntime-extensions/operators/text at main · microsoft/onnxruntime-extensions (github.com). See if it helps. Thank you, Liqun |
Hi @adityagoel4512 : it would be great if you could try this. Sometimes we find minor issues with the ONNX spec that need to be fixed when we try to implement it. It would be helpful to identify this before ONNX is released. Thanks! |
Will take a look! I wasn't aware ORT would support 1.15 before the ONNX release. |
Description
This PR adds
keys_as_tensor
andvalues_as_tensor
attributes as discussed in #5412. This is intended to be in line with the approach followed when introducing tensor attributes to operators previously like TreeEnsemble* operators so converter libraries require no code change.This requires a bump to
ai.onnx.ml
opset 4.Shape inference tests can also now be applied across versions for
ai.onnx.ml
operators. Previously this only worked for the default domain.In this new version of the LabelEncoder,
int32_t
andint16_t
types are also proposed but no additionalkeys_*
/values_*
attributes are added.Motivation and Context
Closes #5412.