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

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Sep 15, 2019
1 parent 3562402 commit 3f43363
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _unittests/ut_onnxrt/test_onnxrt_validate_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from logging import getLogger
import pprint
import numpy
import onnx
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase, unittest_require_at_least
from sklearn.exceptions import ConvergenceWarning
Expand Down Expand Up @@ -99,6 +100,7 @@ def test_validate_sklearn_operators_float64(self):
self.dtype_test_validate_sklearn_operators(numpy.float64)

@unittest_require_at_least(skl2onnx, '1.5.9999')
@unittest_require_at_least(onnx, '1.5.29')
def test_validate_sklearn_operators_float64_gpr(self):
self.dtype_test_validate_sklearn_operators(
numpy.float64, {'GaussianProcessRegressor'})
Expand Down
2 changes: 2 additions & 0 deletions _unittests/ut_onnxrt/test_rt_valid_model_gaussian_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from logging import getLogger
import numpy
from pandas import DataFrame
import onnx
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import ExtTestCase, skipif_circleci, unittest_require_at_least
from sklearn.exceptions import ConvergenceWarning
Expand Down Expand Up @@ -150,6 +151,7 @@ def myprint(*args, **kwargs):
self.assertGreater(len(buffer), 1 if debug else 0)

@unittest_require_at_least(skl2onnx, '1.5.9999')
@unittest_require_at_least(onnx, '1.5.29')
@ignore_warnings(category=(UserWarning, ConvergenceWarning, RuntimeWarning))
@skipif_circleci("to investigate, shape of predictions are different")
def test_rt_GaussianProcessRegressor_debug_std(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
import unittest
from logging import getLogger
from pandas import DataFrame
import onnx
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import ExtTestCase
from pyquickhelper.pycode import ExtTestCase, unittest_require_at_least
from sklearn.exceptions import ConvergenceWarning
from sklearn.utils.testing import ignore_warnings
from skl2onnx import __version__ as skl2onnx_version
Expand All @@ -14,6 +15,7 @@

class TestRtValidateGaussianProcessOptim(ExtTestCase):

@unittest_require_at_least(onnx, '1.5.29')
@ignore_warnings(category=(UserWarning, ConvergenceWarning, RuntimeWarning))
def test_rt_GaussianProcessRegressor_python_optim(self):
fLOG(__file__, self._testMethodName, OutputPrint=__name__ == "__main__")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import unittest
from logging import getLogger
import onnx
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import ExtTestCase, skipif_circleci, unittest_require_at_least
from pyquickhelper.texthelper.version_helper import compare_module_version
Expand All @@ -20,6 +21,7 @@
class TestRtValidateGaussianProcessOrt2(ExtTestCase):

@unittest_require_at_least(skl2onnx, '1.5.9999')
@unittest_require_at_least(onnx, '1.5.29')
@ignore_warnings(category=(UserWarning, ConvergenceWarning, RuntimeWarning))
@skipif_circleci("to investigate, shape of predictions are different")
@unittest.skipIf(compare_module_version(ort_version, threshold) <= 0,
Expand Down

0 comments on commit 3f43363

Please sign in to comment.