44import os
55import warnings
66import numpy
7+ import packaging .version as pv
78from onnx .defs import onnx_opset_version
89from onnxconverter_common .onnx_ex import DEFAULT_OPSET_NUMBER
910from ..convert .common .data_types import FloatTensorType
@@ -40,7 +41,7 @@ def dump_data_and_model(data, model, onnx=None, basename="model", folder=None,
4041 :param allow_failure: None to raise an exception if comparison fails
4142 for the backends, otherwise a string which is then evaluated to check
4243 whether or not the test can fail, example:
43- ``"StrictVersion (onnx.__version__) < StrictVersion ('1.3.0')"``
44+ ``"pv.Version (onnx.__version__) < pv.Version ('1.3.0')"``
4445 :param verbose: prints more information when it fails
4546 :return: the created files
4647
@@ -243,7 +244,7 @@ def dump_one_class_classification(model, suffix="", folder=None, allow_failure=N
243244 :param allow_failure: None to raise an exception if comparison fails
244245 for the backends, otherwise a string which is then evaluated to check
245246 whether or not the test can fail, example:
246- ``"StrictVersion (onnx.__version__) < StrictVersion ('1.3.0')"``
247+ ``"pv.Version (onnx.__version__) < pv.Version ('1.3.0')"``
247248 :return: output of :func:`dump_data_and_model`
248249
249250 Every created filename will follow the pattern:
@@ -269,7 +270,7 @@ def dump_binary_classification(model, suffix="", folder=None, allow_failure=None
269270 :param allow_failure: None to raise an exception if comparison fails
270271 for the backends, otherwise a string which is then evaluated to check
271272 whether or not the test can fail, example:
272- ``"StrictVersion (onnx.__version__) < StrictVersion ('1.3.0')"``
273+ ``"pv.Version (onnx.__version__) < pv.Version ('1.3.0')"``
273274 :param verbose: prints more information when it fails
274275 :return: output of :func:`dump_data_and_model`
275276
@@ -296,7 +297,7 @@ def dump_multiple_classification(model, suffix="", folder=None, allow_failure=No
296297 :param allow_failure: None to raise an exception if comparison fails
297298 for the backends, otherwise a string which is then evaluated to check
298299 whether or not the test can fail, example:
299- ``"StrictVersion (onnx.__version__) < StrictVersion ('1.3.0')"``
300+ ``"pv.Version (onnx.__version__) < pv.Version ('1.3.0')"``
300301 :return: output of :func:`dump_data_and_model`
301302
302303 Every created filename will follow the pattern:
@@ -322,7 +323,7 @@ def dump_multiple_regression(model, suffix="", folder=None, allow_failure=None):
322323 :param allow_failure: None to raise an exception if comparison fails
323324 for the backends, otherwise a string which is then evaluated to check
324325 whether or not the test can fail, example:
325- ``"StrictVersion (onnx.__version__) < StrictVersion ('1.3.0')"``
326+ ``"pv.Version (onnx.__version__) < pv.Version ('1.3.0')"``
326327 :return: output of :func:`dump_data_and_model`
327328
328329 Every created filename will follow the pattern:
@@ -349,7 +350,7 @@ def dump_single_regression(model, suffix="", folder=None, allow_failure=None):
349350 :param allow_failure: None to raise an exception if comparison fails
350351 for the backends, otherwise a string which is then evaluated to check
351352 whether or not the test can fail, example:
352- ``"StrictVersion (onnx.__version__) < StrictVersion ('1.3.0')"``
353+ ``"pv.Version (onnx.__version__) < pv.Version ('1.3.0')"``
353354 :return: output of :func:`dump_data_and_model`
354355
355356 Every created filename will follow the pattern:
0 commit comments