Skip to content

Commit

Permalink
upgrade onnx to 1.17 (#309)
Browse files Browse the repository at this point in the history
* upgrade onnx

* fix np function
  • Loading branch information
xiaowuhu authored Dec 3, 2024
1 parent 209a47e commit f7a8eb6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linux-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion onnxconverter_common/onnx2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions onnxconverter_common/pytracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7a8eb6

Please sign in to comment.