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 |
---|---|
Common tests to all benchmarks testing converted scikit-learn models. See benchmark attributes. … |
|
Common class for a classifier. |
|
Common class for a classifier. |
|
Common class for a clustering algorithm. |
|
Common class for a multi-classifier. |
|
Common class for outlier detection. |
|
Common class for a regressor. |
|
Common class for a trainable transformer. |
|
Common class for a transformer. |
|
Common class for a transformer for positive features. |
Methods#
method |
truncated documentation |
---|---|
Checks that runtime has the appropriate method. |
|
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
Checks that runtime has the appropriate method. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Does some verifications. Fails if inconsistencies. |
|
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
|
Does some verifications. Fails if inconsistencies. |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
Returns the runtime shortname. |
|
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
|
Returns the runtime shortname. |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
asv API |
|
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
asv API |
|
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.
- class mlprodict.asv_benchmark.common_asv_skl._CommonAsvSklBenchmark#
Bases:
object
Common tests to all benchmarks testing converted scikit-learn models. See benchmark attributes.
- _check_rt(rt, meth)#
Checks that runtime has the appropriate method.
- _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.
- 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.
- _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.
- _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.
- _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.
- _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.
- _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.
- _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.
- _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.
- _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.
- _get_dataset(nf, dtype)#