onnxscript: Illegal "IsScalar" node encountered in exported ONNX model
An exported model contains an IsScalar op which is not in the ONNX spec.
Seems like it comes from the use of common_ops.IsScalar in aten_mean_dim.
Env:
torch 2.3.0.dev20240202+cu121
onnxscript 0.1.0.dev20240203
MONAI installed with pip3 install git+https://github.com/Project-MONAI/MONAI@0.8.1#egg=MONAI
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 26 (18 by maintainers)
Both model opset_import and functions opset_imports are actually correct without the fix. So it is not needed.
I have checked that the inliner in onnx-weekly works correctly on OP’s model, where as inliner in onnx 1.15 would leave out an
IsScalarnode inside an if subgraph, while removingIsScalarfrom model.functions.@yuanyao-nv the OP issues turns out to be bug in (previous) Netron display and onnx 1.15 inliner. Both should be fixed in latest version.