Repository: onnx/onnx

Issue:
MacOS release action is failing.
### Description

(https://github.com/actions/setup-python/issues/855)

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -50,8 +50,8 @@
 DEBUG = os.getenv("DEBUG", "0") == "1"
 COVERAGE = os.getenv("COVERAGE", "0") == "1"
 
-# Customize the wheel plat-name, usually needed for MacOS builds.
-# See usage in .github/workflows/release_mac.yml
+# Customize the wheel plat-name; sometimes useful for MacOS builds.
+# See https://github.com/onnx/onnx/pull/6117
 ONNX_WHEEL_PLATFORM_NAME = os.getenv("ONNX_WHEEL_PLATFORM_NAME")
 
 ################################################################################


Test patch:
diff --git a/onnx/backend/test/case/node/dequantizelinear.py b/onnx/backend/test/case/node/dequantizelinear.py
--- a/onnx/backend/test/case/node/dequantizelinear.py
+++ b/onnx/backend/test/case/node/dequantizelinear.py
@@ -202,7 +202,7 @@ def export_uint4() -> None:
         # scalar zero point and scale
         x = make_tensor("x", TensorProto.UINT4, [5], [0, 1, 7, 10, 15])
         x_scale = np.float32(2)
-        x_zero_point = make_tensor("zero_point", TensorProto.UINT4, (1,), [1])
+        x_zero_point = make_tensor("x_zero_point", TensorProto.UINT4, (1,), [1])
         y = np.array([-2, 0, 12, 18, 28], dtype=np.float32)
 
         expect(
@@ -224,7 +224,7 @@ def export_int4() -> None:
         # scalar zero point and scale
         x = make_tensor("x", TensorProto.INT4, [5], [0, 1, 7, -4, -8])
         x_scale = np.float32(2)
-        x_zero_point = make_tensor("zero_point", TensorProto.INT4, (1,), [1])
+        x_zero_point = make_tensor("x_zero_point", TensorProto.INT4, (1,), [1])
         y = np.array([-2, 0, 12, -10, -18], dtype=np.float32)
 
         expect(
diff --git a/onnx/backend/test/case/node/quantizelinear.py b/onnx/backend/test/case/node/quantizelinear.py
--- a/onnx/backend/test/case/node/quantizelinear.py
+++ b/onnx/backend/test/case/node/quantizelinear.py
@@ -73,7 +73,7 @@ def export_e4m3fn() -> None:
 
         x = np.array([0.0, 1.0, 2.0, 100000.0, 200.0]).astype(np.float32)
         y_scale = np.float32(2)
-        y_zero_point = make_tensor("zero_point", TensorProto.FLOAT8E4M3FN, [1], [0])
+        y_zero_point = make_tensor("y_zero_point", TensorProto.FLOAT8E4M3FN, [1], [0])
         y = make_tensor("y", TensorProto.FLOAT8E4M3FN, [5], [0, 0.5, 1, 448, 96])
 
         expect(
@@ -93,7 +93,7 @@ def export_e5m2() -> None:
 
         x = np.array([0.0, 1.0, 2.0, 100000.0, 200.0]).astype(np.float32)
         y_scale = np.float32(2)
-        y_zero_point = make_tensor("zero_point", TensorProto.FLOAT8E5M2, [1], [0.0])
+        y_zero_point = make_tensor("y_zero_point", TensorProto.FLOAT8E5M2, [1], [0.0])
         y = make_tensor("y", TensorProto.FLOAT8E5M2, [5], [0, 0.5, 1, 49152, 96])
 
         expect(
@@ -230,7 +230,7 @@ def export_uint4() -> None:
 
         y_scale = np.asarray([2.0, 3.0, 4.0], dtype=np.float32)
         y_zero_point = make_tensor(
-            "zero_point", TensorProto.UINT4, y_scale.shape, np.ones_like(y_scale)
+            "y_zero_point", TensorProto.UINT4, y_scale.shape, np.ones_like(y_scale)
         )
         y = make_tensor(
             "y", TensorProto.UINT4, x.shape, [1, 2, 3, 5, -1, -1, 3, 4, 4, 5, 5, 11]
@@ -262,7 +262,7 @@ def export_int4() -> None:
 
         y_scale = np.asarray([2.0, 3.0, 4.0], dtype=np.float32)
         y_zero_point = make_tensor(
-            "zero_point", TensorProto.INT4, y_scale.shape, np.ones_like(y_scale)
+            "y_zero_point", TensorProto.INT4, y_scale.shape, np.ones_like(y_scale)
         )
         y = make_tensor(
             "y", TensorProto.INT4, x.shape, [1, 2, 3, 5, -8, -6, 3, 4, 4, 5, 5, 7]
diff --git a/onnx/backend/test/data/node/test_dequantizelinear_int4/test_data_set_0/input_2.pb b/onnx/backend/test/data/node/test_dequantizelinear_int4/test_data_set_0/input_2.pb
--- a/onnx/backend/test/data/node/test_dequantizelinear_int4/test_data_set_0/input_2.pb
+++ b/onnx/backend/test/data/node/test_dequantizelinear_int4/test_data_set_0/input_2.pb
@@ -1,2 +1 @@
-*B
-zero_point
\ No newline at end of file
+*Bx_zero_point
\ No newline at end of file
diff --git a/onnx/backend/test/data/node/test_dequantizelinear_uint4/test_data_set_0/input_2.pb b/onnx/backend/test/data/node/test_dequantizelinear_uint4/test_data_set_0/input_2.pb
--- a/onnx/backend/test/data/node/test_dequantizelinear_uint4/test_data_set_0/input_2.pb
+++ b/onnx/backend/test/data/node/test_dequantizelinear_uint4/test_data_set_0/input_2.pb
@@ -1,2 +1 @@
-*B
-zero_point
\ No newline at end of file
+*Bx_zero_point
\ No newline at end of file
diff --git a/onnx/backend/test/data/node/test_quantizelinear_e4m3fn/test_data_set_0/input_2.pb b/onnx/backend/test/data/node/test_quantizelinear_e4m3fn/test_data_set_0/input_2.pb
Binary files a/onnx/backend/test/data/node/test_quantizelinear_e4m3fn/test_data_set_0/input_2.pb and b/onnx/backend/test/data/node/test_quantizelinear_e4m3fn/test_data_set_0/input_2.pb differ
diff --git a/onnx/backend/test/data/node/test_quantizelinear_e5m2/test_data_set_0/input_2.pb b/onnx/backend/test/data/node/test_quantizelinear_e5m2/test_data_set_0/input_2.pb
Binary files a/onnx/backend/test/data/node/test_quantizelinear_e5m2/test_data_set_0/input_2.pb and b/onnx/backend/test/data/node/test_quantizelinear_e5m2/test_data_set_0/input_2.pb differ
diff --git a/onnx/backend/test/data/node/test_quantizelinear_int4/test_data_set_0/input_2.pb b/onnx/backend/test/data/node/test_quantizelinear_int4/test_data_set_0/input_2.pb
--- a/onnx/backend/test/data/node/test_quantizelinear_int4/test_data_set_0/input_2.pb
+++ b/onnx/backend/test/data/node/test_quantizelinear_int4/test_data_set_0/input_2.pb
@@ -1,2 +1 @@
-*B
-zero_point
\ No newline at end of file
+*By_zero_point
\ No newline at end of file
diff --git a/onnx/backend/test/data/node/test_quantizelinear_uint4/test_data_set_0/input_2.pb b/onnx/backend/test/data/node/test_quantizelinear_uint4/test_data_set_0/input_2.pb
--- a/onnx/backend/test/data/node/test_quantizelinear_uint4/test_data_set_0/input_2.pb
+++ b/onnx/backend/test/data/node/test_quantizelinear_uint4/test_data_set_0/input_2.pb
@@ -1,2 +1 @@
-*B
-zero_point
\ No newline at end of file
+*By_zero_point
\ No newline at end of file