Skip to content

Commit 5593f4d

Browse files
authored
Merge branch 'main' into patch-1
2 parents 2efd039 + c34ac1d commit 5593f4d

File tree

7 files changed

+27
-27
lines changed

7 files changed

+27
-27
lines changed

.github/workflows/keras_application_test_ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ jobs:
2424
- name: Checkout code
2525
uses: actions/checkout@v4
2626

27-
- name: Run Tests (Py38-TF2.9)
27+
- name: Run Tests (Py39-TF2.9)
2828
uses: ./.github/actions/keras_application_test
2929
with:
3030
tf_version: '2.9.0'
31-
python_version: '3.8'
31+
python_version: '3.9'
3232
ort_version: '1.16.3'
3333
onnx_version: '1.16.1'
3434

3535
- name: Upload Test Results
3636
if: always()
3737
uses: actions/upload-artifact@v4
3838
with:
39-
name: Test Results (Py38-TF2.9-ubuntu)
39+
name: Test Results (Py39-TF2.9-ubuntu)
4040
path: ./**/test-results-*.xml
4141

4242
Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo.

.github/workflows/keras_unit_test_ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ jobs:
2323
- name: Checkout code
2424
uses: actions/checkout@v4
2525

26-
- name: Run Tests (Py38-TF2.9)
26+
- name: Run Tests (Py39-TF2.9)
2727
uses: ./.github/actions/keras_unit_test
2828
with:
2929
tf_version: '2.9.0'
30-
python_version: '3.8'
30+
python_version: '3.9'
3131
ort_version: '1.16.3'
3232
onnx_version: '1.16.1'
3333

3434
- name: Upload Test Results
3535
if: always()
3636
uses: actions/upload-artifact@v4
3737
with:
38-
name: Test Results (Py38-TF2.9-ubuntu)
38+
name: Test Results (Py39-TF2.9-ubuntu)
3939
path: ./**/test-results-*.xml
4040

4141
Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo.

.github/workflows/pretrained_model_test_ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
- name: Checkout code
2525
uses: actions/checkout@v4
2626

27-
- name: Run Tests (Py38-TF2.9-18)
27+
- name: Run Tests (Py39-TF2.9-18)
2828
uses: ./.github/actions/pretrained_model_test
2929
with:
3030
os: 'ubuntu-latest'
3131
tf_version: '2.9.0'
32-
python_version: '3.8'
32+
python_version: '3.9'
3333
ort_version: '1.16.3'
3434
onnx_version: '1.16.1'
3535
opset_version: '18'
@@ -39,7 +39,7 @@ jobs:
3939
if: always()
4040
uses: actions/upload-artifact@v4
4141
with:
42-
name: Test Results (Py38-TF2.9-18-ubuntu)
42+
name: Test Results (Py39-TF2.9-18-ubuntu)
4343
path: ./**/test-results-*.xml
4444

4545
Test_max_py_with_latest_tf: # Do not change this name because it is used in 'publish-test-results' section below.

.github/workflows/unit_test_ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
- name: Checkout code
2525
uses: actions/checkout@v4
2626

27-
- name: Run Tests (Py38-TF2.9-18)
27+
- name: Run Tests (Py39-TF2.9-18)
2828
uses: ./.github/actions/unit_test
2929
with:
3030
os: 'ubuntu-latest'
3131
tf_version: '2.9.0'
32-
python_version: '3.8'
32+
python_version: '3.9'
3333
ort_version: '1.16.3'
3434
onnx_version: '1.16.1'
3535
opset_version: '18'
@@ -39,7 +39,7 @@ jobs:
3939
if: always()
4040
uses: actions/upload-artifact@v4
4141
with:
42-
name: Test Results (Py38-TF2.9-18-ubuntu)
42+
name: Test Results (Py39-TF2.9-18-ubuntu)
4343
path: ./**/test-results-*.xml
4444

4545
Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo.
@@ -74,17 +74,13 @@ jobs:
7474
fail-fast: false
7575
matrix:
7676
name:
77-
- 'py38-tf2.13'
7877
- 'py39-tf2.15'
7978
os: ['ubuntu-latest', 'windows-2022']
8079
opset_version: ['18', '15']
8180
ort_version: ['1.16.3']
8281
onnx_version: ['1.16.1']
8382
skip_tflite: ['False']
8483
include:
85-
- name: 'py38-tf2.13'
86-
tf_version: '2.13.0'
87-
python_version: '3.8'
8884
- name: 'py39-tf2.15'
8985
tf_version: '2.15.0'
9086
python_version: '3.9'

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<!--- SPDX-License-Identifier: Apache-2.0 -->
1+
<!--
2+
Copyright (c) ONNX Project Contributors
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
26

37
# tf2onnx - Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX.
48

@@ -15,10 +19,10 @@ The common issues we run into we try to document here [Troubleshooting Guide](Tr
1519

1620
<br/>
1721

18-
| Build Type | OS | Python | TensorFlow | ONNX opset | Status |
19-
| --- | --- | --- | --- | --- | --- |
20-
| Unit Test - Basic | Linux, Windows | 3.7-3.10 | 1.15, 2.9-2.15 | 14-18 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test?branchName=main)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=16&branchName=main) |
21-
| Unit Test - Full | Linux, Windows | 3.7-3.10 | 1.15, 2.9-2.15 | 14-18 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test-matrix?branchName=main)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=18&branchName=main) | |
22+
| Build Type | OS | Python | TensorFlow | ONNX opset |
23+
| --- | - | --- | --- | --- |
24+
| Unit Test - Basic | Linux, Windows | 3.7-3.12 | 1.15, 2.9-2.15 | 14-18 |
25+
| Unit Test - Full | Linux, Windows | 3.7-3.12 | 1.15, 2.9-2.15 | 14-18 |
2226
<br/>
2327

2428
## Supported Versions
@@ -42,7 +46,7 @@ You can install tf2onnx on top of tf-1.x or tf-2.x.
4246

4347
### Python
4448

45-
We support Python ```3.7-3.10```.
49+
We support Python ```3.7-3.12```.
4650

4751
## Prerequisites
4852

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ def run(self):
9595
'Topic :: Software Development :: Libraries',
9696
'Topic :: Software Development :: Libraries :: Python Modules',
9797
'Programming Language :: Python :: 3',
98-
'Programming Language :: Python :: 3.7',
99-
'Programming Language :: Python :: 3.8',
10098
'Programming Language :: Python :: 3.9',
101-
'Programming Language :: Python :: 3.10']
99+
'Programming Language :: Python :: 3.10',
100+
'Programming Language :: Python :: 3.11',
101+
'Programming Language :: Python :: 3.12']
102102
)

tf2onnx/tfonnx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def rewrite_constant_fold(g, ops):
7474
func_map = {
7575
"Add": np.add,
7676
"GreaterEqual": np.greater_equal,
77-
"Cast": np.cast,
77+
"Cast": np.asarray,
7878
"ConcatV2": np.concatenate,
7979
"Less": np.less,
8080
"ListDiff": np.setdiff1d,
@@ -107,7 +107,7 @@ def rewrite_constant_fold(g, ops):
107107
if op.type == "Cast":
108108
dst = op.get_attr_int("to")
109109
np_type = tf2onnx.utils.map_onnx_to_numpy_type(dst)
110-
val = np.cast[np_type](*inputs)
110+
val = np.asarray(*inputs, dtype=np_type)
111111
elif op.type == "ConcatV2":
112112
axis = inputs[-1]
113113
values = inputs[:-1]

0 commit comments

Comments
 (0)