module onnxrt.doc.doc_helper
#
Short summary#
module mlprodict.onnxrt.doc.doc_helper
Documentation helper.
Classes#
class |
truncated documentation |
---|---|
Defines a schema for operators added in this package such as |
Functions#
function |
truncated documentation |
---|---|
Switches from AaBb into aa_bb. |
|
|
|
Returns a documentation in RST format for all OnnxOperator. |
|
Mapping between types name and type integer value. |
|
Returns a jinja2 template to display DOT graph for each converter from sklearn-onnx. |
Methods#
method |
truncated documentation |
---|---|
Documentation#
Documentation helper.
- class mlprodict.onnxrt.doc.doc_helper.NewOperatorSchema(name)#
Bases:
object
Defines a schema for operators added in this package such as
TreeEnsembleRegressorDouble
.- __init__(name)#
- mlprodict.onnxrt.doc.doc_helper._get_doc_template()#
- mlprodict.onnxrt.doc.doc_helper.change_style(name)#
Switches from AaBb into aa_bb.
- Parameters
name – name to convert
- Returns
converted name
- mlprodict.onnxrt.doc.doc_helper.debug_onnx_object(obj, depth=3)#
__dict__
is not in most of onnx objects. This function uses function dir to explore this object.
- mlprodict.onnxrt.doc.doc_helper.get_rst_doc(op_name)#
Returns a documentation in RST format for all OnnxOperator.
- Parameters
op_name – operator name of None for all
- Returns
string
The function relies on module jinja2 or replaces it with a simple rendering if not present.
- mlprodict.onnxrt.doc.doc_helper.type_mapping(name)#
Mapping between types name and type integer value.
<<<
from mlprodict.onnxrt.doc.doc_helper import type_mapping import pprint pprint.pprint(type_mapping(None)) print(type_mapping("INT")) print(type_mapping(2))
>>>
{'FLOAT': 1, 'FLOATS': 6, 'GRAPH': 5, 'GRAPHS': 10, 'INT': 2, 'INTS': 7, 'SPARSE_TENSOR': 11, 'STRING': 3, 'STRINGS': 8, 'TENSOR': 4, 'TENSORS': 9, 'UNDEFINED': 0} 2 INT
- mlprodict.onnxrt.doc.doc_helper.visual_rst_template()#
Returns a jinja2 template to display DOT graph for each converter from sklearn-onnx.
<<<
from mlprodict.onnxrt.doc.doc_helper import visual_rst_template print(visual_rst_template())
>>>
.. _l-{{link}}: {{ title }} {{ '=' * len(title) }} Fitted on a problem type *{{ kind }}* (see :func:`find_suitable_problem <mlprodict.onnxrt.validate.validate_problems.find_suitable_problem>`), method `{{ method }}` matches output {{ output_index }}. {{ optim_param }} :: {{ indent(model, " ") }} {{ table }} .. gdot:: {{ indent(dot, " ") }}