Skip to content

Commit 9b50e3a

Browse files
committed
upgrade version
1 parent bc37c7b commit 9b50e3a

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

‎CHANGELOGS.rst‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
Change Logs
22
===========
33

4-
0.3.2
4+
0.3.3
55
+++++
66

77
* :pr:`104`: add code rendering when conveting a model into code
88
* :pr:`103`: fix import issue with the latest onnx version
9+
10+
0.3.2
11+
+++++
12+
913
* :pr:`101`: fix as_tensor in onnx_text_plot_tree
1014

1115
0.3.1

‎_unittests/ut_translate_api/test_translate.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from onnx.reference import ReferenceEvaluator
77
from onnx_array_api.ext_test_case import ExtTestCase
88
from onnx_array_api.light_api import start, g
9-
from onnx_array_api.translate_api import translate
9+
from onnx_array_api.translate_api import translate, translate_header
1010
from onnx_array_api.translate_api.base_emitter import EventType
1111

1212
OPSET_API = min(19, onnx_opset_version() - 1)
@@ -18,6 +18,11 @@ def test_event_type(self):
1818
EventType.to_str(EventType.INITIALIZER), "EventType.INITIALIZER"
1919
)
2020

21+
def test_translate_header(self):
22+
for f in ["light", "onnx", "builder"]:
23+
translate_header(f)
24+
self.assertRaise(lambda: translate_header("NONE"), ValueError)
25+
2126
def test_exp(self):
2227
onx = start(opset=19).vin("X").Exp().rename("Y").vout().to_onnx()
2328
self.assertIsInstance(onx, onnx.ModelProto)

‎_unittests/ut_xrun_doc/test_command_lines1.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_command_translate(self):
6969
main(args)
7070

7171
code = st.getvalue()
72-
self.assertIn("model = make_model(", code)
72+
self.assertIn("model = oh.make_model(", code)
7373

7474
args = ["translate", "-m", model_file, "-a", "light"]
7575
st = StringIO()

‎onnx_array_api/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
APIs to create ONNX Graphs.
33
"""
44

5-
__version__ = "0.3.2"
5+
__version__ = "0.3.3"
66
__author__ = "Xavier Dupré"

‎onnx_array_api/translate_api/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def translate_header(api: str = "light"):
3636
from onnx_array_api.graph_api import GraphBuilder
3737
"""
3838
)
39+
raise ValueError(f"Unexpected value {api!r} for api.")
3940

4041

4142
def translate(proto: ModelProto, single_line: bool = False, api: str = "light") -> str:

0 commit comments

Comments
 (0)