module onnxrt.validate.validate_benchmark_replay#

Inheritance diagram of mlprodict.onnxrt.validate.validate_benchmark_replay

Short summary#

module mlprodict.onnxrt.validate.validate_benchmark_replay

Measures time processing for ONNX models.

source on GitHub

Classes#

class

truncated documentation

SimplifiedOnnxInference

Simple wrapper around InferenceSession which imitates OnnxInference. It only enable CPUExecutionProvider. …

Functions#

function

truncated documentation

enumerate_benchmark_replay

Replays a benchmark stored with function enumerate_validated_operator_opsets

Properties#

property

truncated documentation

input_names

Returns InferenceSession input names.

Methods#

method

truncated documentation

__init__

run

Calls InferenceSession.run.

Documentation#

Measures time processing for ONNX models.

source on GitHub

class mlprodict.onnxrt.validate.validate_benchmark_replay.SimplifiedOnnxInference(ort, runtime='onnxruntime')#

Bases: object

Simple wrapper around InferenceSession which imitates OnnxInference. It only enable CPUExecutionProvider.

Parameters:

runtime – see InferenceSession

source on GitHub

__init__(ort, runtime='onnxruntime')#
property input_names#

Returns InferenceSession input names.

run(input)#

Calls InferenceSession.run.

mlprodict.onnxrt.validate.validate_benchmark_replay.enumerate_benchmark_replay(folder, runtime='python', time_kwargs=None, skip_long_test=True, time_kwargs_fact=None, time_limit=4, verbose=1, fLOG=None)#

Replays a benchmark stored with function enumerate_validated_operator_opsets or command line validate_runtime. Enumerates the results.

Parameters:
  • folder – folder where to find pickled files, all files must have pkl or pickle extension

  • runtime – runtime or runtimes

  • time_kwargs – to define a more precise way to measure a model

  • skip_long_test – skips tests for high values of N if they seem too long

  • time_kwargs_fact – see _multiply_time_kwargs

  • time_limit – to skip the rest of the test after this limit (in second)

  • verbose – if >= 1, uses tqdm

  • fLOG – logging function

Returns:

iterator on results

source on GitHub