module onnxrt.validate.validate_python
#
Short summary#
module mlprodict.onnxrt.validate.validate_python
Helpers to validate python code.
Functions#
function |
truncated documentation |
---|---|
Same function as |
|
Validates the code produced by method |
Documentation#
Helpers to validate python code.
- mlprodict.onnxrt.validate.validate_python._make_callable(fct, obj, code, gl, debug)#
Same function as
make_callable
but deals with function which an undefined number of arguments.
- mlprodict.onnxrt.validate.validate_python.validate_python_inference(oinf, inputs, tolerance=0.0)#
Validates the code produced by method
to_python
. The function compiles and executes the code given as an argument and compares the results to what oinf returns. This function is mostly used for unit testing purpose but it is not robust enough to handle all cases.- Parameters
oinf –
OnnxInference
inputs – inputs as dictionary
tolerance – discrepencies must be below or equal to this theshold
The function fails if the expected output are not the same.