Promote to ONNX commit that has StringNormalizer#499
Conversation
Adjust implementation to match ONNX spec.
|
Hi @yuslepukhin |
|
Please feel free to revise the doc and make it better. :-) |
| kernel_registry.Register(BuildKernelCreateInfo<ONNX_OPERATOR_TYPED_KERNEL_CLASS_NAME(kCpuExecutionProvider, kOnnxDomain, 9, int64_t, NonZero)>()); | ||
| kernel_registry.Register(BuildKernelCreateInfo<ONNX_OPERATOR_TYPED_KERNEL_CLASS_NAME(kCpuExecutionProvider, kOnnxDomain, 9, string, Where)>()); | ||
| kernel_registry.Register(BuildKernelCreateInfo<ONNX_OPERATOR_TYPED_KERNEL_CLASS_NAME(kCpuExecutionProvider, kOnnxDomain, 9, float, Where)>()); | ||
|
|
There was a problem hiding this comment.
Do we need this empty line?
There was a problem hiding this comment.
Yes, I need to add a comment // Opset 10
wschin
left a comment
There was a problem hiding this comment.
Looks great. Just one tiny comment.
|
The failed Linux test was due to disk space full. I'll solve it tomorrow. |
There was a problem hiding this comment.
import onnxruntime
x = ['monday' 'tuesday']
y = ['monday' 'tuesday']
np.testing.assert_allclose(x,y)When I run this code, I got:
Traceback (most recent call last):
File "1.py", line 6, in <module>
np.testing.assert_allclose(x,y)
File "/usr/local/lib64/python3.6/site-packages/numpy/testing/_private/utils.py", line 1493, in assert_allclose
verbose=verbose, header=header, equal_nan=equal_nan)
File "/usr/local/lib64/python3.6/site-packages/numpy/testing/_private/utils.py", line 781, in assert_array_compare
val = comparison(x, y)
File "/usr/local/lib64/python3.6/site-packages/numpy/testing/_private/utils.py", line 1488, in compare
equal_nan=equal_nan)
File "/usr/local/lib64/python3.6/site-packages/numpy/core/numeric.py", line 2521, in isclose
xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Exactly the same error.
So, please fix your test code in the ONNX repo.
|
Can we update to onnx/onnx@873ddbb instead? That has some changes to BackendTest, which enables overriding the comparison function. We can also use that to fix the GRU test. e.g. code from my branch (need ONNX update to check it in) to do the override to handle the GRU test. It would however be better to fix the ONNX level comparison code, but if that is going to take longer this is possibly a short term workaround. |
Override BackendTest class to handle strings compasision properly until this is fixed in ONNX.
|
Created onnx/onnx#1851 |
Adjust implementation to match ONNX spec.