module onnxrt.ops_whole.session#

Inheritance diagram of mlprodict.onnxrt.ops_whole.session

Short summary#

module mlprodict.onnxrt.ops_whole.session

Shortcut to ops_whole.

source on GitHub

Classes#

class

truncated documentation

OnnxWholeSession

Runs the prediction for a single ONNX, it lets the runtime handle the graph logic as well.

Static Methods#

staticmethod

truncated documentation

process_profiling

Flattens json returned by onnxruntime profiling.

Methods#

method

truncated documentation

__init__

get_profiling

Returns the profiling informations.

run

Computes the predictions.

Documentation#

Shortcut to ops_whole.

source on GitHub

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_dataONNX 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.

source on GitHub

__init__(onnx_data, runtime, runtime_options=None, device=None)#
get_profiling()#

Returns the profiling informations.

source on GitHub

static process_profiling(js)#

Flattens json returned by onnxruntime profiling.

Parameters:

js – json

Returns:

list of dictionaries

source on GitHub

run(inputs)#

Computes the predictions.

Parameters:

inputs – dictionary {variable, value}

Returns:

list of outputs

source on GitHub