tutorials
tutorials copied to clipboard
Add Batch processing with SequenceMap tutorial
Adding a tutorial showing how to use the SequenceMap operator to perform batch processing operations.
Signed-off-by: Joaquin Anton [email protected]
@jcwchen The SequenceMap
operator has been merged. I think this example is ready for review.
Thanks for the quick update after your ONNX PR. May I ask you: are you fine if we forward this PR at least after official ONNXRuntime supports new ONNX operator SequenceMap? It can prevent some confusion if users would like to try it out with current ONNX and ORT. (If we directly publish this document, they will now see couple of warnings.)
IIUC, next release for ONNX will be in May and ORT will be in June.
Sure, that seems reasonable
Thanks for waiting. Now ONNX 1.12 has been released -- before merging it, @jantonguirao please let me know if you would like to add something else. Otherwise, I will forward this PR. Thank you
Thanks for waiting. Now ONNX 1.12 has been released -- before merging it, @jantonguirao please let me know if you would like to add something else. Otherwise, I will forward this PR. Thank you
I don't have anything to add. We should probably just rerun the notebook. I have a question: shouldn't we wait until onnxruntime supports opset 17, or it is enough if it's there in ONNX?
Good point. Let's wait for ORT 1.12.0 then (which is also coming soon). Thanks!
ORT 1.12.0 has been released. @jantonguirao Shall we revive this work by updating the notebook with the latest onnx and onnxruntime? Thanks!
@jcwchen I have tested with ORT 1.12.1 and unfortunately, it doesn't seem to work. I am getting errors like:
InvalidGraph: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. In Node, ("", Loop, "", -1) : ("_0x39b8f70_SequenceMap_input_sequence_seqlen": tensor(int64),"_0x39b8f70_SequenceMap_input_sequence_cond": tensor(bool),"_0x39b8f70_SequenceMap_out_sequence_0_seqempty": seq(tensor(uint8)),) -> ("batch_processed": seq(tensor(uint8)),) , Error Nodes in a graph must be topologically sorted, however input '_0x39b8f70_target_size' of node:
name: OpType: Cast
is not output of any previous nodes.
I'll prepare a self-contained reproduction script and file a bug.
https://github.com/microsoft/onnxruntime/issues/12491 @jcwchen FYI
@jcwchen The issue I mentioned above is fixed with https://github.com/microsoft/onnxruntime/pull/12758 I've updated the notebook. When this PR gets merged I think we can review and merge this notebook. Thank you.