Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Update test_template_benchmark.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Feb 13, 2020
1 parent 747dd97 commit f19a806
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions _unittests/ut_asv_benchmark/test_template_benchmark.py
Expand Up @@ -3,14 +3,13 @@
"""
import os
import unittest
from onnx.defs import onnx_opset_version
try:
from sklearn.utils._testing import ignore_warnings
except ImportError:
from sklearn.utils.testing import ignore_warnings
from skl2onnx.common.exceptions import MissingShapeCalculator
from pyquickhelper.pycode import ExtTestCase

from mlprodict.tools.asv_options_helper import benchmark_version
from mlprodict.asv_benchmark.template.skl_model_classifier import (
TemplateBenchmarkClassifier
)
Expand Down Expand Up @@ -51,7 +50,7 @@ def test_template_benchmark_classifier(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
optim = None
for runtime in ['skl', 'pyrt', 'ort']:
Expand Down Expand Up @@ -86,7 +85,7 @@ def test_template_benchmark_classifier_raw_score(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
optim = None
for runtime in ['skl', 'pyrt', 'ort']:
Expand Down Expand Up @@ -121,7 +120,7 @@ def test_template_benchmark_clustering(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
optim = None
for runtime in ['skl', 'pyrt']:
Expand Down Expand Up @@ -153,7 +152,7 @@ def test_template_benchmark_regressor(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
optim = None
for runtime in ['skl', 'pyrt', 'ort']:
Expand Down Expand Up @@ -188,7 +187,7 @@ def test_template_benchmark_multi_classifier(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
optim = None
for runtime in ['skl', 'pyrt']:
Expand Down Expand Up @@ -225,7 +224,7 @@ def test_template_benchmark_outlier(self):
N = 60
nf = cl.params[2][1]
expect = 10
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
optim = None
for runtime in ['skl', 'pyrt']:
Expand Down Expand Up @@ -264,7 +263,7 @@ def test_template_benchmark_trainable_transform(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
expect = 12
optim = None
Expand Down Expand Up @@ -305,7 +304,7 @@ def test_template_benchmark_transform(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
expect = 10
optim = None
Expand Down Expand Up @@ -345,7 +344,7 @@ def test_template_benchmark_transformPositive(self):
cl.setup_cache()
N = 60
nf = cl.params[2][1]
opset = onnx_opset_version()
opset = benchmark_version()[-1]
dtype = 'float'
expect = 12
optim = None
Expand Down

0 comments on commit f19a806

Please sign in to comment.