Skip to content

Commit

Permalink
fix issue with python 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
  • Loading branch information
xadupre committed May 22, 2024
1 parent ab14529 commit 05f76b9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions onnxmltools/proto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@


def _check_onnx_version():
import pkg_resources
from onnx import __version__

min_required_version = pkg_resources.parse_version("1.0.1")
current_version = pkg_resources.get_distribution("onnx").parsed_version
assert (
current_version >= min_required_version
), "ONNXMLTools requires ONNX version 1.0.1 or a newer one"
return not __version__.startswith("0.")


_check_onnx_version()
Expand Down

0 comments on commit 05f76b9

Please sign in to comment.