Skip to content

Commit 202047e

Browse files
authored
Merge pull request #578 from ModECI/development
Update dependencies and improve documentation for GitHub Actions
2 parents c2dc04f + 778b429 commit 202047e

59 files changed

Lines changed: 103371 additions & 345 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
name: Format
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-python@v5
19+
- uses: actions/checkout@v6
20+
- uses: actions/setup-python@v6
2121
with:
2222
python-version: '3.10'
2323
- uses: pre-commit/action@v3.0.1
@@ -38,15 +38,15 @@ jobs:
3838
test-suite: tensorflow
3939

4040
steps:
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v6
4242

4343
- name: Setup Python
44-
uses: actions/setup-python@v5
44+
uses: actions/setup-python@v6
4545
with:
4646
python-version: ${{ matrix.python-version }}
4747

4848
- name: Install uv and set the python version
49-
uses: astral-sh/setup-uv@v6
49+
uses: astral-sh/setup-uv@v7
5050
with:
5151
python-version: ${{ matrix.python-version }}
5252

@@ -86,12 +86,12 @@ jobs:
8686
needs: tests
8787
runs-on: ubuntu-latest
8888
steps:
89-
- uses: actions/checkout@v4
90-
- uses: actions/setup-python@v5
89+
- uses: actions/checkout@v6
90+
- uses: actions/setup-python@v6
9191
with:
9292
python-version: '3.11'
9393
- name: Install uv and set the python version
94-
uses: astral-sh/setup-uv@v6
94+
uses: astral-sh/setup-uv@v7
9595
with:
9696
python-version: '3.11'
9797
- name: Generate and Build Docs
@@ -107,13 +107,13 @@ jobs:
107107
name: Distribution build
108108
runs-on: ubuntu-latest
109109
steps:
110-
- uses: actions/checkout@v4
110+
- uses: actions/checkout@v6
111111
- name: Build sdist & wheel
112112
run: pipx run --spec build pyproject-build
113-
- uses: actions/upload-artifact@v4
113+
- uses: actions/upload-artifact@v7
114114
with:
115115
path: dist
116-
- uses: pypa/gh-action-pypi-publish@v1.4.1
116+
- uses: pypa/gh-action-pypi-publish@v1.14.0
117117
if: github.event_name == 'release' && github.event.action == 'published'
118118
with:
119119
user: __token__

.github/workflows/ci_test_all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
runs-on: [ubuntu-latest]
1919

2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v6
2222

23-
- uses: actions/setup-python@v5
23+
- uses: actions/setup-python@v6
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626

docs/MDF_function_specifications.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,15 +686,15 @@
686686
"expression_string": "onnx_ops.lppool(X, auto_pad, kernel_shape, p, pads, strides)"
687687
},
688688
"onnx::MatMul": {
689-
"description": "\nMatrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).\n",
689+
"description": "\nMatrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html\n",
690690
"arguments": [
691691
"A",
692692
"B"
693693
],
694694
"expression_string": "onnx_ops.matmul(A, B)"
695695
},
696696
"onnx::MatMulInteger": {
697-
"description": "\nMatrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).\nThe production MUST never overflow. The accumulation may overflow if and only if in 32 bits.\n",
697+
"description": "\nMatrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html.\nThe production MUST never overflow. The accumulation may overflow if and only if in 32 bits.\n",
698698
"arguments": [
699699
"A",
700700
"B",
@@ -711,7 +711,7 @@
711711
"expression_string": "onnx_ops.max(data_0)"
712712
},
713713
"onnx::MaxPool": {
714-
"description": "\n MaxPool consumes an input tensor X and applies max pooling across\n the tensor according to kernel sizes, stride sizes, and pad lengths.\n max pooling consisting of computing the max on all values of a\n subset of the input tensor according to the kernel size and downsampling the\n data into the output tensor Y for further processing. The output spatial shape is calculated differently\n depending on whether explicit padding is used, where pads is employed, or auto padding is used, where auto_pad is utilized.\n With explicit padding (https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html?highlight=maxpool#torch.nn.MaxPool2d):\n ```\n output_spatial_shape[i] = floor((input_spatial_shape[i] + pad_shape[i] - dilation[i] * (kernel_shape[i] - 1) - 1) / strides_spatial_shape[i] + 1)\n ```\n or\n ```\n output_spatial_shape[i] = ceil((input_spatial_shape[i] + pad_shape[i] - dilation[i] * (kernel_shape[i] - 1) - 1) / strides_spatial_shape[i] + 1)\n ```\n if ceil_mode is enabled. `pad_shape[i]` is the sum of pads along axis `i`.\n\n `auto_pad` is a DEPRECATED attribute. If you are using them currently, the output spatial shape will be following when ceil_mode is enabled:\n ```\n VALID: output_spatial_shape[i] = ceil((input_spatial_shape[i] - ((kernel_spatial_shape[i] - 1) * dilations[i] + 1) + 1) / strides_spatial_shape[i])\n SAME_UPPER or SAME_LOWER: output_spatial_shape[i] = ceil(input_spatial_shape[i] / strides_spatial_shape[i])\n ```\n or when ceil_mode is disabled (https://www.tensorflow.org/api_docs/python/tf/keras/layers/AveragePooling2D):\n ```\n VALID: output_spatial_shape[i] = floor((input_spatial_shape[i] - ((kernel_spatial_shape[i] - 1) * dilations[i] + 1)) / strides_spatial_shape[i]) + 1\n SAME_UPPER or SAME_LOWER: output_spatial_shape[i] = floor((input_spatial_shape[i] - 1) / strides_spatial_shape[i]) + 1\n ```\n And pad shape will be following if `SAME_UPPER` or `SAME_LOWER`:\n ```\n pad_shape[i] = (output_spatial_shape[i] - 1) * strides_spatial_shape[i] + ((kernel_spatial_shape[i] - 1) * dilations[i] + 1) - input_spatial_shape[i]\n ```\n The output of each pooling window is maximum number of elements exclude pad. \n ",
714+
"description": "\n MaxPool consumes an input tensor X and applies max pooling across\n the tensor according to kernel sizes, stride sizes, and pad lengths.\n max pooling consisting of computing the max on all values of a\n subset of the input tensor according to the kernel size and downsampling the\n data into the output tensor Y for further processing. The output spatial shape is calculated differently\n depending on whether explicit padding is used, where pads is employed, or auto padding is used, where auto_pad is utilized.\n With explicit padding (https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html?highlight=maxpool#torch.nn.MaxPool2d):\n ```\n output_spatial_shape[i] = floor((input_spatial_shape[i] + pad_shape[i] - dilation[i] * (kernel_shape[i] - 1) - 1) / strides_spatial_shape[i] + 1)\n ```\n or\n ```\n output_spatial_shape[i] = ceil((input_spatial_shape[i] + pad_shape[i] - dilation[i] * (kernel_shape[i] - 1) - 1) / strides_spatial_shape[i] + 1)\n ```\n if ceil_mode is enabled. `pad_shape[i]` is the sum of pads along axis `i`. Sliding windows that would start in the right padded region are ignored.\n\n `auto_pad` is a DEPRECATED attribute. If you are using them currently, the output spatial shape will be following when ceil_mode is enabled:\n ```\n VALID: output_spatial_shape[i] = ceil((input_spatial_shape[i] - ((kernel_spatial_shape[i] - 1) * dilations[i] + 1) + 1) / strides_spatial_shape[i])\n SAME_UPPER or SAME_LOWER: output_spatial_shape[i] = ceil(input_spatial_shape[i] / strides_spatial_shape[i])\n ```\n or when ceil_mode is disabled (https://www.tensorflow.org/api_docs/python/tf/keras/layers/AveragePooling2D):\n ```\n VALID: output_spatial_shape[i] = floor((input_spatial_shape[i] - ((kernel_spatial_shape[i] - 1) * dilations[i] + 1)) / strides_spatial_shape[i]) + 1\n SAME_UPPER or SAME_LOWER: output_spatial_shape[i] = floor((input_spatial_shape[i] - 1) / strides_spatial_shape[i]) + 1\n ```\n And pad shape will be following if `SAME_UPPER` or `SAME_LOWER`:\n ```\n pad_shape[i] = (output_spatial_shape[i] - 1) * strides_spatial_shape[i] + ((kernel_spatial_shape[i] - 1) * dilations[i] + 1) - input_spatial_shape[i]\n ```\n The output of each pooling window is maximum number of elements exclude pad. \n ",
715715
"arguments": [
716716
"X"
717717
],
@@ -900,7 +900,7 @@
900900
"expression_string": "onnx_ops.qlinearconv(x, x_scale, x_zero_point, w, w_scale, w_zero_point, y_scale, y_zero_point, B, auto_pad, dilations, group, kernel_shape, pads, strides)"
901901
},
902902
"onnx::QLinearMatMul": {
903-
"description": "\nMatrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).\nIt consumes two quantized input tensors, their scales and zero points, scale and zero point of output,\nand computes the quantized output. The quantization formula is y = saturate((x / y_scale) + y_zero_point).\nFor (x / y_scale), it is rounding to nearest ties to even. Refer to https://en.wikipedia.org/wiki/Rounding for details.\nScale and zero point must have same shape. They must be either scalar (per tensor) or N-D tensor\n(per row for 'a' and per column for 'b'). Scalar refers to per tensor quantization whereas N-D refers to per row\nor per column quantization. If the input is 2D of shape [M, K] then zero point and scale tensor may be\nan M element vector [v_1, v_2, ..., v_M] for per row quantization and K element vector of shape [v_1, v_2, ..., v_K]\nfor per column quantization. If the input is N-D tensor with shape [D1, D2, M, K] then zero point and scale tensor may\nhave shape [D1, D2, M, 1] for per row quantization and shape [D1, D2, 1, K] for per column quantization.\nProduction must never overflow, and accumulation may overflow if and only if in 32 bits.\n",
903+
"description": "\nMatrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html.\nIt consumes two quantized input tensors, their scales and zero points, scale and zero point of output,\nand computes the quantized output. The quantization formula is y = saturate((x / y_scale) + y_zero_point).\nFor (x / y_scale), it is rounding to nearest ties to even. Refer to https://en.wikipedia.org/wiki/Rounding for details.\nScale and zero point must have same shape. They must be either scalar (per tensor) or N-D tensor\n(per row for 'a' and per column for 'b'). Scalar refers to per tensor quantization whereas N-D refers to per row\nor per column quantization. If the input is 2D of shape [M, K] then zero point and scale tensor may be\nan M element vector [v_1, v_2, ..., v_M] for per row quantization and K element vector of shape [v_1, v_2, ..., v_K]\nfor per column quantization. If the input is N-D tensor with shape [D1, D2, M, K] then zero point and scale tensor may\nhave shape [D1, D2, M, 1] for per row quantization and shape [D1, D2, 1, K] for per column quantization.\nProduction must never overflow, and accumulation may overflow if and only if in 32 bits.\n",
904904
"arguments": [
905905
"a",
906906
"a_scale",

docs/MDF_function_specifications.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ Python version: `onnx_ops.lppool(X, auto_pad, kernel_shape, p, pads, strides)`
16851685

16861686
## MatMul
16871687
<p><i>
1688-
Matrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).
1688+
Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html
16891689
</i></p>
16901690

16911691
Python version: `onnx_ops.matmul(A, B)`
@@ -1695,7 +1695,7 @@ Python version: `onnx_ops.matmul(A, B)`
16951695

16961696
## MatMulInteger
16971697
<p><i>
1698-
Matrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).
1698+
Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html.
16991699
The production MUST never overflow. The accumulation may overflow if and only if in 32 bits.
17001700
</i></p>
17011701

@@ -1732,7 +1732,7 @@ Python version: `onnx_ops.max(data_0)`
17321732
```
17331733
output_spatial_shape[i] = ceil((input_spatial_shape[i] + pad_shape[i] - dilation[i] * (kernel_shape[i] - 1) - 1) / strides_spatial_shape[i] + 1)
17341734
```
1735-
if ceil_mode is enabled. `pad_shape[i]` is the sum of pads along axis `i`.
1735+
if ceil_mode is enabled. `pad_shape[i]` is the sum of pads along axis `i`. Sliding windows that would start in the right padded region are ignored.
17361736

17371737
`auto_pad` is a DEPRECATED attribute. If you are using them currently, the output spatial shape will be following when ceil_mode is enabled:
17381738
```
@@ -2237,7 +2237,7 @@ Python version: `onnx_ops.qlinearconv(x, x_scale, x_zero_point, w, w_scale, w_ze
22372237

22382238
## QLinearMatMul
22392239
<p><i>
2240-
Matrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).
2240+
Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html.
22412241
It consumes two quantized input tensors, their scales and zero points, scale and zero point of output,
22422242
and computes the quantized output. The quantization formula is y = saturate((x / y_scale) + y_zero_point).
22432243
For (x / y_scale), it is rounding to nearest ties to even. Refer to https://en.wikipedia.org/wiki/Rounding for details.

docs/MDF_function_specifications.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ onnx::LpPool:
16171617
onnx::MatMul:
16181618
description: '
16191619
1620-
Matrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).
1620+
Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html
16211621
16221622
'
16231623
arguments:
@@ -1627,7 +1627,7 @@ onnx::MatMul:
16271627
onnx::MatMulInteger:
16281628
description: '
16291629
1630-
Matrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).
1630+
Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html.
16311631
16321632
The production MUST never overflow. The accumulation may overflow if and only
16331633
if in 32 bits.
@@ -1668,7 +1668,8 @@ onnx::MaxPool:
16681668
\ 1)\n ```\n or\n ```\n output_spatial_shape[i] = ceil((input_spatial_shape[i]\
16691669
\ + pad_shape[i] - dilation[i] * (kernel_shape[i] - 1) - 1) / strides_spatial_shape[i]\
16701670
\ + 1)\n ```\n if ceil_mode is enabled. `pad_shape[i]` is the sum of pads\
1671-
\ along axis `i`.\n\n `auto_pad` is a DEPRECATED attribute. If you are using\
1671+
\ along axis `i`. Sliding windows that would start in the right padded region\
1672+
\ are ignored.\n\n `auto_pad` is a DEPRECATED attribute. If you are using\
16721673
\ them currently, the output spatial shape will be following when ceil_mode\
16731674
\ is enabled:\n ```\n VALID: output_spatial_shape[i] = ceil((input_spatial_shape[i]\
16741675
\ - ((kernel_spatial_shape[i] - 1) * dilations[i] + 1) + 1) / strides_spatial_shape[i])\n\
@@ -2089,7 +2090,7 @@ onnx::QLinearConv:
20892090
onnx::QLinearMatMul:
20902091
description: '
20912092
2092-
Matrix product that behaves like [numpy.matmul](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html).
2093+
Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html.
20932094
20942095
It consumes two quantized input tensors, their scales and zero points, scale
20952096
and zero point of output,

0 commit comments

Comments
 (0)