Skip to content

Commit a070da3

Browse files
authored
Update readme (#74)
* update requirements * improves readme * improve documentation * documentation * fix format
1 parent f5d9ed1 commit a070da3

File tree

7 files changed

+65
-13
lines changed

7 files changed

+65
-13
lines changed

README.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ onnx-array-api: APIs to create ONNX Graphs
3131

3232
**onnx-array-api** implements APIs to create custom ONNX graphs.
3333
The objective is to speed up the implementation of converter libraries.
34+
The library is released on
35+
`pypi/onnx-array-api <https://pypi.org/project/onnx-array-api/>`_
36+
and its documentation is published at
37+
`APIs to create ONNX Graphs <https://sdpython.github.io/doc/onnx-array-api/dev/>`_.
3438

3539
Numpy API
3640
+++++++++
@@ -147,11 +151,6 @@ The euclidean distance looks like the following:
147151
.to_onnx()
148152
)
149153
150-
The library is released on
151-
`pypi/onnx-array-api <https://pypi.org/project/onnx-array-api/>`_
152-
and its documentation is published at
153-
`APIs to create ONNX Graphs <https://sdpython.github.io/doc/onnx-array-api/dev/>`_.
154-
155154
GraphBuilder API
156155
++++++++++++++++
157156

_doc/examples/plot_onnx_diff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@
6464
print(text)
6565

6666
###############################
67+
# See :ref:`l-long-output-compare_onnx_execution` for a better view.
6768
# The display shows that ReduceSumSquare was replaced by Mul + ReduceSum,
6869
# and ReduceLogSumExp by ReduceMax + Sub + Exp + Log + Add.

_doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ The objective is to speed up the implementation of converter libraries.
4545

4646
CHANGELOGS
4747
license
48+
long_outputs
4849

4950
Sources available on
5051
`github/onnx-array-api <https://github.com/sdpython/onnx-array-api>`_.

_doc/long_outputs.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
:hide-toc:
2+
3+
==========================
4+
Long outputs uneasy to see
5+
==========================
6+
7+
.. contents::
8+
:local:
9+
10+
onnx
11+
====
12+
13+
.. _l-long-output-compare_onnx_execution:
14+
15+
onnx_array_api.reference.compare_onnx_execution
16+
+++++++++++++++++++++++++++++++++++++++++++++++
17+
18+
From example :ref:`l-onnx-diff-example` for function
19+
:func:`onnx_array_api.reference.compare_onnx_execution`.
20+
See also `raw rendering <https://github.com/sdpython/onnx-array-api/blob/main/_doc/long_outputs.rst#onnx_array_apireferencecompare_onnx_execution>`_.
21+
22+
::
23+
24+
1 = | INITIA float64 1 HAAA Ad_Addcst | INITIA float64 1 HAAA Ad_Addcst
25+
2 = | INITIA float64 4x4 ADZF Ge_Gemmcst | INITIA float64 4x4 ADZF Ge_Gemmcst
26+
3 = | INITIA float64 4 USEA Ge_Gemmcst1 | INITIA float64 4 USEA Ge_Gemmcst1
27+
4 = | INITIA float64 1 AAAA Mu_Mulcst | INITIA float64 1 AAAA Mu_Mulcst
28+
5 = | INITIA float64 1 DAAA Ad_Addcst1 | INITIA float64 1 DAAA Ad_Addcst1
29+
6 = | INITIA float64 1 AAAA Ad_Addcst2 | INITIA float64 1 AAAA Ad_Addcst2
30+
7 = | INPUT float64 1x4 AAAA X | INPUT float64 1x4 AAAA X
31+
8 = | RESULT float64 1x4 UTFC Gemm Ge_Y0 | RESULT float64 1x4 UTFC Gemm Ge_Y0
32+
9 + | | RESULT float64 1x4 TIEG Mul Mu_C01
33+
10 ~ | RESULT float64 1x1 NAAA ReduceSumS Re_reduced0 | RESULT float64 1x1 NAAA ReduceSum Re_reduced0
34+
11 = | RESULT float64 1x1 NAAA Concat Co_concat_re | RESULT float64 1x1 NAAA Concat Co_concat_re
35+
12 = | RESULT float64 1x1 UAAA Add Ad_C02 | RESULT float64 1x1 UAAA Add Ad_C02
36+
13 = | RESULT float64 1x1 DAAA Mul Mu_C0 | RESULT float64 1x1 DAAA Mul Mu_C0
37+
14 = | RESULT float64 1x1 GAAA Add Ad_C01 | RESULT float64 1x1 GAAA Add Ad_C01
38+
15 = | RESULT float64 1x1 GAAA Add Ad_C0 | RESULT float64 1x1 GAAA Add Ad_C0
39+
16 = | RESULT int64 1x1 AAAA ArgMax label | RESULT int64 1x1 AAAA ArgMax label
40+
17 + | | RESULT float64 1x1 GAAA ReduceMax Re_reduced03
41+
18 + | | RESULT float64 1x1 AAAA Sub Su_C01
42+
19 + | | RESULT float64 1x1 BAAA Exp Ex_output0
43+
20 + | | RESULT float64 1x1 BAAA ReduceSum Re_reduced02
44+
21 + | | RESULT float64 1x1 AAAA Log Lo_output0
45+
22 ~ | RESULT float64 1x1 GAAA ReduceLogS score_sample | RESULT float64 1x1 GAAA Add score_sample
46+
23 = | RESULT float64 1x1 AAAA Sub Su_C0 | RESULT float64 1x1 AAAA Sub Su_C0
47+
24 = | RESULT float64 1x1 BAAA Exp probabilitie | RESULT float64 1x1 BAAA Exp probabilitie
48+
25 = | OUTPUT int64 1x1 AAAA label | OUTPUT int64 1x1 AAAA label
49+
26 = | OUTPUT float64 1x1 BAAA probabilitie | OUTPUT float64 1x1 BAAA probabilitie
50+
27 = | OUTPUT float64 1x1 GAAA score_sample | OUTPUT float64 1x1 GAAA score_sample

_unittests/onnx-numpy-skips.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# API failures
22
# see https://github.com/data-apis/array-api-tests/blob/master/numpy-skips.txt
33
# uses __setitem__
4+
array_api_tests/test_creation_functions.py::test_arange
45
array_api_tests/test_creation_functions.py::test_asarray_arrays
56
array_api_tests/test_creation_functions.py::test_empty
67
array_api_tests/test_creation_functions.py::test_empty_like

_unittests/ut_reference/test_evaluator_yield.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,13 @@ def test_distance_sequence_str(self):
422422
text = dc.to_str(s1, s2, align)
423423
self.assertIn("OUTPUT", text)
424424
expected = """
425-
1=|INPUTfloat322x2ABCDA|INPUTfloat322x2ABCDA
426-
2=|INPUTfloat322x2ABCDB|INPUTfloat322x2ABCDB
427-
3~|INPUTfloat322x3ABCDX|INPUTfloat322x2ABCDX
428-
4-|RESULTfloat322x2CEIOExpH|
429-
5=|RESULTfloat322x2CEIOLinearRegrY1|RESULTfloat322x2CEIOLinearRegrY1
430-
6~|RESULTfloat322x2CEIOAbsY|RESULTfloat322x3CEIPAbsZ
431-
7~|OUTPUTfloat322x2CEIOY|OUTPUTfloat322x2CEIPY
425+
001=|INPUTfloat322x2ABCDA|INPUTfloat322x2ABCDA
426+
002=|INPUTfloat322x2ABCDB|INPUTfloat322x2ABCDB
427+
003~|INPUTfloat322x3ABCDX|INPUTfloat322x2ABCDX
428+
004-|RESULTfloat322x2CEIOExpH|
429+
005=|RESULTfloat322x2CEIOLinearRegrY1|RESULTfloat322x2CEIOLinearRegrY1
430+
006~|RESULTfloat322x2CEIOAbsY|RESULTfloat322x3CEIPAbsZ
431+
007~|OUTPUTfloat322x2CEIOY|OUTPUTfloat322x2CEIPY
432432
""".replace(
433433
" ", ""
434434
).strip(

onnx_array_api/reference/evaluator_yield.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def to_str(
368368
else:
369369
d1 = s1[i]
370370
line = f"- | {_align(str(d1), column_size)} | {_align('', column_size)}"
371-
rows.append(f"{row_index: 3d} {line}")
371+
rows.append(f"{row_index:03d} {line}")
372372
last = i, j
373373
row_index += 1
374374
return "\n".join(rows)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy