module plotting.plotting_validate_graph
#
Short summary#
module mlprodict.plotting.plotting_validate_graph
Functions to help visualizing performances.
Functions#
function |
truncated documentation |
---|---|
Extracts the main component of a model, removes suffixes such |
|
Plots a graph which summarizes the performances of a benchmark validating a runtime for ONNX. |
Documentation#
Functions to help visualizing performances.
- mlprodict.plotting.plotting_validate_graph._model_name(name)#
Extracts the main component of a model, removes suffixes such
Classifier
,Regressor
,CV
.- Parameters:
name – string
- Returns:
shorter string
- mlprodict.plotting.plotting_validate_graph.plot_validate_benchmark(df)#
Plots a graph which summarizes the performances of a benchmark validating a runtime for ONNX.
- Parameters:
df – output of function
summary_report
- Returns:
fig, ax
from logging import getLogger from pandas import DataFrame import matplotlib.pyplot as plt from mlprodict.onnxrt.validate import enumerate_validated_operator_opsets, summary_report from mlprodict.tools.plotting import plot_validate_benchmark rows = list(enumerate_validated_operator_opsets( verbose=0, models={"LinearRegression"}, opset_min=11, runtime=['python', 'onnxruntime1'], debug=False, benchmark=True, n_features=[None, 10])) df = DataFrame(rows) piv = summary_report(df) fig, ax = plot_validate_benchmark(piv) plt.show()