From 6eb6adff2f1a2fe988e79c53e622b18f9ff7ab26 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 2 Feb 2024 17:22:54 +0100 Subject: [PATCH 1/5] update requirements --- azure-pipelines.yml | 4 ++-- requirements-dev.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 907bb9f..61587f4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,8 @@ jobs: vmImage: 'ubuntu-latest' strategy: matrix: - Python311-Linux: - python.version: '3.11' + Python312-Linux: + python.version: '3.12' maxParallel: 3 steps: diff --git a/requirements-dev.txt b/requirements-dev.txt index 5804529..5e262e3 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,7 +11,7 @@ lightgbm matplotlib ml-dtypes git+https://github.com/onnx/onnxmltools.git -onnxruntime>=1.16.1 +onnxruntime>=1.17.0 openpyxl packaging pandas From f518e2f7b9eed54441a9e0dffebee6d3bab7d33a Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Wed, 7 Feb 2024 17:41:32 +0100 Subject: [PATCH 2/5] improves readme --- README.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index fa6cdb7..f7b387f 100644 --- a/README.rst +++ b/README.rst @@ -31,6 +31,10 @@ onnx-array-api: APIs to create ONNX Graphs **onnx-array-api** implements APIs to create custom ONNX graphs. The objective is to speed up the implementation of converter libraries. +The library is released on +`pypi/onnx-array-api `_ +and its documentation is published at +`APIs to create ONNX Graphs `_. Numpy API +++++++++ @@ -147,11 +151,6 @@ The euclidean distance looks like the following: .to_onnx() ) -The library is released on -`pypi/onnx-array-api `_ -and its documentation is published at -`APIs to create ONNX Graphs `_. - GraphBuilder API ++++++++++++++++ From daed74bdbd8c0205b5fc4ac12810ad971471b580 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Wed, 7 Feb 2024 17:53:41 +0100 Subject: [PATCH 3/5] improve documentation --- _doc/examples/plot_onnx_diff.py | 1 + _doc/index.rst | 1 + _doc/long_outputs.rst | 44 +++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 _doc/long_outputs.rst diff --git a/_doc/examples/plot_onnx_diff.py b/_doc/examples/plot_onnx_diff.py index 7a5f1d3..7b6ecdf 100644 --- a/_doc/examples/plot_onnx_diff.py +++ b/_doc/examples/plot_onnx_diff.py @@ -64,5 +64,6 @@ print(text) ############################### +# See :ref:`l-long-output-compare_onnx_execution` for a better view. # The display shows that ReduceSumSquare was replaced by Mul + ReduceSum, # and ReduceLogSumExp by ReduceMax + Sub + Exp + Log + Add. diff --git a/_doc/index.rst b/_doc/index.rst index b81be4f..f9a07e5 100644 --- a/_doc/index.rst +++ b/_doc/index.rst @@ -45,6 +45,7 @@ The objective is to speed up the implementation of converter libraries. CHANGELOGS license + long_outputs Sources available on `github/onnx-array-api `_. diff --git a/_doc/long_outputs.rst b/_doc/long_outputs.rst new file mode 100644 index 0000000..91b1f48 --- /dev/null +++ b/_doc/long_outputs.rst @@ -0,0 +1,44 @@ +========================== +Long outputs uneasy to see +========================== + +onnx +==== + +.. _l-long-output-compare_onnx_execution: + +onnx_array_api.reference.compare_onnx_execution ++++++++++++++++++++++++++++++++++++++++++++++++ + +From example :ref:`l-onnx-diff-example` for function +:func:`onnx_array_api.reference.compare_onnx_execution`. + +:: + + 1 = | INITIA float64 1 HAAA Ad_Addcst | INITIA float64 1 HAAA Ad_Addcst + 2 = | INITIA float64 4x4 ADZF Ge_Gemmcst | INITIA float64 4x4 ADZF Ge_Gemmcst + 3 = | INITIA float64 4 USEA Ge_Gemmcst1 | INITIA float64 4 USEA Ge_Gemmcst1 + 4 = | INITIA float64 1 AAAA Mu_Mulcst | INITIA float64 1 AAAA Mu_Mulcst + 5 = | INITIA float64 1 DAAA Ad_Addcst1 | INITIA float64 1 DAAA Ad_Addcst1 + 6 = | INITIA float64 1 AAAA Ad_Addcst2 | INITIA float64 1 AAAA Ad_Addcst2 + 7 = | INPUT float64 1x4 AAAA X | INPUT float64 1x4 AAAA X + 8 = | RESULT float64 1x4 UTFC Gemm Ge_Y0 | RESULT float64 1x4 UTFC Gemm Ge_Y0 + 9 + | | RESULT float64 1x4 TIEG Mul Mu_C01 + 10 ~ | RESULT float64 1x1 NAAA ReduceSumS Re_reduced0 | RESULT float64 1x1 NAAA ReduceSum Re_reduced0 + 11 = | RESULT float64 1x1 NAAA Concat Co_concat_re | RESULT float64 1x1 NAAA Concat Co_concat_re + 12 = | RESULT float64 1x1 UAAA Add Ad_C02 | RESULT float64 1x1 UAAA Add Ad_C02 + 13 = | RESULT float64 1x1 DAAA Mul Mu_C0 | RESULT float64 1x1 DAAA Mul Mu_C0 + 14 = | RESULT float64 1x1 GAAA Add Ad_C01 | RESULT float64 1x1 GAAA Add Ad_C01 + 15 = | RESULT float64 1x1 GAAA Add Ad_C0 | RESULT float64 1x1 GAAA Add Ad_C0 + 16 = | RESULT int64 1x1 AAAA ArgMax label | RESULT int64 1x1 AAAA ArgMax label + 17 + | | RESULT float64 1x1 GAAA ReduceMax Re_reduced03 + 18 + | | RESULT float64 1x1 AAAA Sub Su_C01 + 19 + | | RESULT float64 1x1 BAAA Exp Ex_output0 + 20 + | | RESULT float64 1x1 BAAA ReduceSum Re_reduced02 + 21 + | | RESULT float64 1x1 AAAA Log Lo_output0 + 22 ~ | RESULT float64 1x1 GAAA ReduceLogS score_sample | RESULT float64 1x1 GAAA Add score_sample + 23 = | RESULT float64 1x1 AAAA Sub Su_C0 | RESULT float64 1x1 AAAA Sub Su_C0 + 24 = | RESULT float64 1x1 BAAA Exp probabilitie | RESULT float64 1x1 BAAA Exp probabilitie + 25 = | OUTPUT int64 1x1 AAAA label | OUTPUT int64 1x1 AAAA label + 26 = | OUTPUT float64 1x1 BAAA probabilitie | OUTPUT float64 1x1 BAAA probabilitie + 27 = | OUTPUT float64 1x1 GAAA score_sample | OUTPUT float64 1x1 GAAA score_sample From 1d38ec862c9b9ec7f9e770ceb601e3119b2606b7 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Wed, 7 Feb 2024 23:17:24 +0100 Subject: [PATCH 4/5] documentation --- _doc/long_outputs.rst | 24 +++++++++++++++--------- _unittests/onnx-numpy-skips.txt | 1 + 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/_doc/long_outputs.rst b/_doc/long_outputs.rst index 91b1f48..64c0b84 100644 --- a/_doc/long_outputs.rst +++ b/_doc/long_outputs.rst @@ -1,7 +1,12 @@ +:hide-toc: + ========================== Long outputs uneasy to see ========================== +.. contents:: + :local: + onnx ==== @@ -12,18 +17,19 @@ onnx_array_api.reference.compare_onnx_execution From example :ref:`l-onnx-diff-example` for function :func:`onnx_array_api.reference.compare_onnx_execution`. +See also `raw rendering `_. :: - 1 = | INITIA float64 1 HAAA Ad_Addcst | INITIA float64 1 HAAA Ad_Addcst - 2 = | INITIA float64 4x4 ADZF Ge_Gemmcst | INITIA float64 4x4 ADZF Ge_Gemmcst - 3 = | INITIA float64 4 USEA Ge_Gemmcst1 | INITIA float64 4 USEA Ge_Gemmcst1 - 4 = | INITIA float64 1 AAAA Mu_Mulcst | INITIA float64 1 AAAA Mu_Mulcst - 5 = | INITIA float64 1 DAAA Ad_Addcst1 | INITIA float64 1 DAAA Ad_Addcst1 - 6 = | INITIA float64 1 AAAA Ad_Addcst2 | INITIA float64 1 AAAA Ad_Addcst2 - 7 = | INPUT float64 1x4 AAAA X | INPUT float64 1x4 AAAA X - 8 = | RESULT float64 1x4 UTFC Gemm Ge_Y0 | RESULT float64 1x4 UTFC Gemm Ge_Y0 - 9 + | | RESULT float64 1x4 TIEG Mul Mu_C01 + 1 = | INITIA float64 1 HAAA Ad_Addcst | INITIA float64 1 HAAA Ad_Addcst + 2 = | INITIA float64 4x4 ADZF Ge_Gemmcst | INITIA float64 4x4 ADZF Ge_Gemmcst + 3 = | INITIA float64 4 USEA Ge_Gemmcst1 | INITIA float64 4 USEA Ge_Gemmcst1 + 4 = | INITIA float64 1 AAAA Mu_Mulcst | INITIA float64 1 AAAA Mu_Mulcst + 5 = | INITIA float64 1 DAAA Ad_Addcst1 | INITIA float64 1 DAAA Ad_Addcst1 + 6 = | INITIA float64 1 AAAA Ad_Addcst2 | INITIA float64 1 AAAA Ad_Addcst2 + 7 = | INPUT float64 1x4 AAAA X | INPUT float64 1x4 AAAA X + 8 = | RESULT float64 1x4 UTFC Gemm Ge_Y0 | RESULT float64 1x4 UTFC Gemm Ge_Y0 + 9 + | | RESULT float64 1x4 TIEG Mul Mu_C01 10 ~ | RESULT float64 1x1 NAAA ReduceSumS Re_reduced0 | RESULT float64 1x1 NAAA ReduceSum Re_reduced0 11 = | RESULT float64 1x1 NAAA Concat Co_concat_re | RESULT float64 1x1 NAAA Concat Co_concat_re 12 = | RESULT float64 1x1 UAAA Add Ad_C02 | RESULT float64 1x1 UAAA Add Ad_C02 diff --git a/_unittests/onnx-numpy-skips.txt b/_unittests/onnx-numpy-skips.txt index d47cefd..1d46bbb 100644 --- a/_unittests/onnx-numpy-skips.txt +++ b/_unittests/onnx-numpy-skips.txt @@ -1,6 +1,7 @@ # API failures # see https://github.com/data-apis/array-api-tests/blob/master/numpy-skips.txt # uses __setitem__ +array_api_tests/test_creation_functions.py::test_arange array_api_tests/test_creation_functions.py::test_asarray_arrays array_api_tests/test_creation_functions.py::test_empty array_api_tests/test_creation_functions.py::test_empty_like From 18f03276e397ec2d18b8fedc9fa33e65b71e2b04 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Thu, 8 Feb 2024 00:40:21 +0100 Subject: [PATCH 5/5] fix format --- _unittests/ut_reference/test_evaluator_yield.py | 14 +++++++------- onnx_array_api/reference/evaluator_yield.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_unittests/ut_reference/test_evaluator_yield.py b/_unittests/ut_reference/test_evaluator_yield.py index 467e6f9..e7f6817 100644 --- a/_unittests/ut_reference/test_evaluator_yield.py +++ b/_unittests/ut_reference/test_evaluator_yield.py @@ -422,13 +422,13 @@ def test_distance_sequence_str(self): text = dc.to_str(s1, s2, align) self.assertIn("OUTPUT", text) expected = """ - 1=|INPUTfloat322x2ABCDA|INPUTfloat322x2ABCDA - 2=|INPUTfloat322x2ABCDB|INPUTfloat322x2ABCDB - 3~|INPUTfloat322x3ABCDX|INPUTfloat322x2ABCDX - 4-|RESULTfloat322x2CEIOExpH| - 5=|RESULTfloat322x2CEIOLinearRegrY1|RESULTfloat322x2CEIOLinearRegrY1 - 6~|RESULTfloat322x2CEIOAbsY|RESULTfloat322x3CEIPAbsZ - 7~|OUTPUTfloat322x2CEIOY|OUTPUTfloat322x2CEIPY + 001=|INPUTfloat322x2ABCDA|INPUTfloat322x2ABCDA + 002=|INPUTfloat322x2ABCDB|INPUTfloat322x2ABCDB + 003~|INPUTfloat322x3ABCDX|INPUTfloat322x2ABCDX + 004-|RESULTfloat322x2CEIOExpH| + 005=|RESULTfloat322x2CEIOLinearRegrY1|RESULTfloat322x2CEIOLinearRegrY1 + 006~|RESULTfloat322x2CEIOAbsY|RESULTfloat322x3CEIPAbsZ + 007~|OUTPUTfloat322x2CEIOY|OUTPUTfloat322x2CEIPY """.replace( " ", "" ).strip( diff --git a/onnx_array_api/reference/evaluator_yield.py b/onnx_array_api/reference/evaluator_yield.py index 40ec97f..df171a6 100644 --- a/onnx_array_api/reference/evaluator_yield.py +++ b/onnx_array_api/reference/evaluator_yield.py @@ -368,7 +368,7 @@ def to_str( else: d1 = s1[i] line = f"- | {_align(str(d1), column_size)} | {_align('', column_size)}" - rows.append(f"{row_index: 3d} {line}") + rows.append(f"{row_index:03d} {line}") last = i, j row_index += 1 return "\n".join(rows) 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