Using custom com.microsoft
ops from python
#22023
Replies: 2 comments 1 reply
-
Your model is invalid. You need to create a full model with make_model, make_graph, make_node... See https://onnx.ai/onnx/intro/python.html. |
Beta Was this translation helpful? Give feedback.
-
I don't have a model for this test, just a single node (but creating a model does not work since it fails at node creation). Can you elaborate why exactly I need a model to invoke The above test is based on https://github.com/onnx/onnx/blob/67c456ba4747412afb44158a1a889c0fc3349641/onnx/test/checker_test.py, which suggests I should be able to create a node and check it without inserting it into a full model. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I would like to use the "com.microsoft" domain ops whose schemas are available in
onnxruntime
, e.g., "SoftmaxGrad", but cannot figure out how after looking at docs and the codebase. I am configuring with--enable_training --enable_pybind --enable_external_custom_op_schemas
. Theonnxruntime.training
python package builds successfully.I am new to this, apologies for the possibly very basic questions. Here is a simple test I tried first:
which fails with
I did check
onnx.defs.get_all_schemas_with_history()
, which does not include the custom ops.I also attempted to use the custom op documentation generator, which relies on the
schemadef
package, but that did not appear to have been compiled into the python bindings. It seems to me that none of the python functions inonnxruntime/python/onnxruntime_pybind_schema.cc
are being compiled, and I can't figure out what controls whether they are built or not.The problem (taken from the documentation generation script):
Beta Was this translation helpful? Give feedback.
All reactions