module onnxrt.ops_whole.session
#
Short summary#
module mlprodict.onnxrt.ops_whole.session
Shortcut to ops_whole.
Classes#
class |
truncated documentation |
---|---|
Runs the prediction for a single ONNX, it lets the runtime handle the graph logic as well. |
Static Methods#
staticmethod |
truncated documentation |
---|---|
Flattens json returned by onnxruntime profiling. |
Methods#
method |
truncated documentation |
---|---|
Returns the profiling informations. |
|
Computes the predictions. |
Documentation#
Shortcut to ops_whole.
- class mlprodict.onnxrt.ops_whole.session.OnnxWholeSession(onnx_data, runtime, runtime_options=None, device=None)#
Bases:
object
Runs the prediction for a single ONNX, it lets the runtime handle the graph logic as well.
- Parameters:
onnx_data – ONNX model or data
runtime – runtime to be used, mostly onnxruntime
runtime_options – runtime options
device – device, a string cpu, cuda, cuda:0…
Changed in version 0.8: Parameter device was added.
- __init__(onnx_data, runtime, runtime_options=None, device=None)#
- get_profiling()#
Returns the profiling informations.
- static process_profiling(js)#
Flattens json returned by onnxruntime profiling.
- Parameters:
js – json
- Returns:
list of dictionaries
- run(inputs)#
Computes the predictions.
- Parameters:
inputs – dictionary {variable, value}
- Returns:
list of outputs