diff --git a/.github/workflows/linux-CI.yml b/.github/workflows/linux-CI.yml index 00e5fc5..c028622 100644 --- a/.github/workflows/linux-CI.yml +++ b/.github/workflows/linux-CI.yml @@ -21,11 +21,11 @@ jobs: python-version: ["3.8", "3.9", "3.10"] include: - python-version: "3.8" - onnx-version: 1.16 + onnx-version: 1.17 - python-version: "3.9" - onnx-version: 1.16 + onnx-version: 1.17 - python-version: "3.10" - onnx-version: 1.16 + onnx-version: 1.17 steps: diff --git a/.github/workflows/windows-CI.yml b/.github/workflows/windows-CI.yml index 786bc12..141f5e2 100644 --- a/.github/workflows/windows-CI.yml +++ b/.github/workflows/windows-CI.yml @@ -21,11 +21,11 @@ jobs: python-version: ["3.8", "3.9", "3.10"] include: - python-version: "3.8" - onnx-version: 1.16 + onnx-version: 1.17 - python-version: "3.9" - onnx-version: 1.16 + onnx-version: 1.17 - python-version: "3.10" - onnx-version: 1.16 + onnx-version: 1.17 steps: - uses: actions/checkout@v4 diff --git a/onnxconverter_common/onnx2py.py b/onnxconverter_common/onnx2py.py index 684fa01..89f4a5b 100644 --- a/onnxconverter_common/onnx2py.py +++ b/onnxconverter_common/onnx2py.py @@ -177,7 +177,7 @@ def convert_tensor(tensor): if tensor.data_location == TensorProto.EXTERNAL: return convert_external_tensor(tensor) np_data = numpy_helper.to_array(tensor) - if np.product(np_data.shape) <= 10: + if np.prod(np_data.shape) <= 10: return numpy_helper_traced.from_array(np_data, name=tensor.name) dtype = np_data.dtype if dtype == object: diff --git a/onnxconverter_common/pytracing.py b/onnxconverter_common/pytracing.py index 8134ca6..0f66f27 100644 --- a/onnxconverter_common/pytracing.py +++ b/onnxconverter_common/pytracing.py @@ -22,8 +22,8 @@ class TracingObject: Used by onnx2py to mock a module like numpy or onnx.helper and record calls on that module Ex: np = TracingObject("np") - x = np.array(np.product([1, 2, 3]), np.int32) - assert repr(x) == "np.array(np.product([1, 2, 3]), np.int32)" + x = np.array(np.prod([1, 2, 3]), np.int32) + assert repr(x) == "np.array(np.prod([1, 2, 3]), np.int32)" """ def __init__(self, trace, py_obj=NoPyObjException): self._trace = trace