module onnxrt.validate.validate_benchmark_replay
#
Short summary#
module mlprodict.onnxrt.validate.validate_benchmark_replay
Measures time processing for ONNX models.
Classes#
class |
truncated documentation |
---|---|
Simple wrapper around InferenceSession which imitates |
Functions#
function |
truncated documentation |
---|---|
Replays a benchmark stored with function |
Properties#
property |
truncated documentation |
---|---|
Returns InferenceSession input names. |
Methods#
method |
truncated documentation |
---|---|
Calls InferenceSession.run. |
Documentation#
Measures time processing for ONNX models.
- 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
- __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