module asv_benchmark.common_asv_skl#

Short summary#

module mlprodict.asv_benchmark.common_asv_skl

Common class for all benchmarks testing converted models from scikit-learn with asv. The benchmark can be run through file run_asv.sh on Linux or run_asv.bat on Windows.

Classes#

class

truncated documentation

_CommonAsvSklBenchmark

Common tests to all benchmarks testing converted scikit-learn models. See benchmark attributes. …

_CommonAsvSklBenchmarkClassifier

Common class for a classifier.

_CommonAsvSklBenchmarkClassifierRawScore

Common class for a classifier.

_CommonAsvSklBenchmarkClustering

Common class for a clustering algorithm.

_CommonAsvSklBenchmarkMultiClassifier

Common class for a multi-classifier.

_CommonAsvSklBenchmarkOutlier

Common class for outlier detection.

_CommonAsvSklBenchmarkRegressor

Common class for a regressor.

_CommonAsvSklBenchmarkTrainableTransform

Common class for a trainable transformer.

_CommonAsvSklBenchmarkTransform

Common class for a transformer.

_CommonAsvSklBenchmarkTransformPositive

Common class for a transformer for positive features.

Methods#

method

truncated documentation

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_check_rt

Checks that runtime has the appropriate method.

_create_model

_create_model

_create_model

_create_model

_create_model

_create_model

_create_model

_create_model

_create_model

_create_model

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_and_runtime

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_create_onnx_inference

_get_dataset

_get_dataset

_get_dataset

_get_dataset

_get_dataset

_get_dataset

_get_dataset

_get_dataset

_get_dataset

_get_dataset

_get_xdtype

_get_xdtype

_get_xdtype

_get_xdtype

_get_xdtype

_get_xdtype

_get_xdtype

_get_xdtype

_get_xdtype

_get_xdtype

_name

_name

_name

_name

_name

_name

_name

_name

_name

_name

_optimize_onnx

_optimize_onnx

_optimize_onnx

_optimize_onnx

_optimize_onnx

_optimize_onnx

_optimize_onnx

_optimize_onnx

_optimize_onnx

_optimize_onnx

_score_metric

_score_metric

_score_metric

_score_metric

_score_metric

_score_metric

_score_metric

_score_metric

_score_metric

_score_metric

_to_onnx

_to_onnx

_to_onnx

_to_onnx

_to_onnx

_to_onnx

_to_onnx

_to_onnx

_to_onnx

_to_onnx

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

check_method_name

Does some verifications. Fails if inconsistencies.

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

peakmem_predict

asv API

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

runtime_name

Returns the runtime shortname.

setup

asv API

setup

asv API

setup

asv API

setup

asv API

setup

asv API

setup

asv API

setup

asv API

setup

asv API

setup

asv API

setup

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

setup_cache

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

time_predict

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_nbnodes

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_onnxsize

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_score

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vmlprodict

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vort

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

track_vsklearn

asv API

Documentation#

Common class for all benchmarks testing converted models from scikit-learn with asv. The benchmark can be run through file run_asv.sh on Linux or run_asv.bat on Windows.

Warning

On Windows, you should avoid cloning the repository on a folder with a long full name. Visual Studio tends to abide by the rule of the maximum path length even though the system is told otherwise.

source on GitHub

class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmark#

Bases: object

Common tests to all benchmarks testing converted scikit-learn models. See benchmark attributes.

source on GitHub

_check_rt(rt, meth)#

Checks that runtime has the appropriate method.

source on GitHub

_create_model()#
_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_create_onnx_inference(onx, runtime)#
_get_dataset(nf, dtype)#
_get_xdtype(dtype)#
_name(nf, opset, dtype)#
_optimize_onnx(onx)#
_score_metric(X, y_exp, y_pred)#
_to_onnx(model, X, opset, dtype, optim)#
check_method_name(method_name)#

Does some verifications. Fails if inconsistencies.

par_ydtype#

alias of int64

peakmem_predict(runtime, N, nf, opset, dtype, optim)#

asv API

runtime_name(runtime)#

Returns the runtime shortname.

source on GitHub

setup(runtime, N, nf, opset, dtype, optim)#

asv API

setup_cache()#

asv API

time_predict(runtime, N, nf, opset, dtype, optim)#

asv API

track_nbnodes(runtime, N, nf, opset, dtype, optim)#

asv API

track_onnxsize(runtime, N, nf, opset, dtype, optim)#

asv API

track_score(runtime, N, nf, opset, dtype, optim)#

asv API

track_vmlprodict(runtime, N, nf, opset, dtype, optim)#

asv API

track_vort(runtime, N, nf, opset, dtype, optim)#

asv API

track_vsklearn(runtime, N, nf, opset, dtype, optim)#

asv API

class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkClassifier#

Bases: _CommonAsvSklBenchmark

Common class for a classifier.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkClassifierRawScore#

Bases: _CommonAsvSklBenchmark

Common class for a classifier.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkClustering#

Bases: _CommonAsvSklBenchmark

Common class for a clustering algorithm.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkMultiClassifier#

Bases: _CommonAsvSklBenchmark

Common class for a multi-classifier.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_get_dataset(nf, dtype)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkOutlier#

Bases: _CommonAsvSklBenchmark

Common class for outlier detection.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkRegressor#

Bases: _CommonAsvSklBenchmark

Common class for a regressor.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkTrainableTransform#

Bases: _CommonAsvSklBenchmark

Common class for a trainable transformer.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkTransform#

Bases: _CommonAsvSklBenchmark

Common class for a transformer.

source on GitHub

_create_onnx_and_runtime(runtime, model, X, opset, dtype, optim)#
_score_metric(X, y_exp, y_pred)#
class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmarkTransformPositive#

Bases: _CommonAsvSklBenchmarkTransform

Common class for a transformer for positive features.

source on GitHub

_get_dataset(nf, dtype)#