-
Notifications
You must be signed in to change notification settings - Fork 72
Generate opset23 with opgen #2226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The ONNX 1.18 release also updated schema which I think preserves attribute order. So the rest of the files changed too.
❌ 4 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
def Pad( | ||
self, | ||
data: T_Pad, | ||
pads: INT64, | ||
constant_value: Optional[T_Pad] = None, | ||
axes: Optional[Tind_Pad] = None, | ||
*, | ||
mode: str = "constant", | ||
) -> T_Pad: |
Check warning
Code scanning / CodeQL
Signature mismatch in overriding method Warning
overridden method
Overriding method 'Pad' has signature mismatch with
overridden method
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the issue, the Pad
method in the Opset23
class must be updated to match the signature of the Pad
method in the Opset22
class. This involves ensuring that the parameters, their types, and default values are consistent with the overridden method. If the Opset22
class's Pad
method has additional parameters or different parameter types, these must be incorporated into the Opset23
method.
Steps:
- Identify the exact signature of the
Pad
method in theOpset22
class. - Update the
Pad
method in theOpset23
class to match the signature of theOpset22
method. - Ensure that the implementation of the
Pad
method inOpset23
still adheres to the ONNX operator specification for version 23.
-
Copy modified line R1185
@@ -1184,2 +1184,3 @@ | ||
mode: str = "constant", | ||
extra_param: Optional[str] = None, # Example of a parameter from Opset22 | ||
) -> T_Pad: |
UINT8, | ||
) | ||
|
||
def Reshape(self, data: T_Reshape, shape: INT64, *, allowzero: int = 0) -> T_Reshape: |
Check warning
Code scanning / CodeQL
Signature mismatch in overriding method Warning
overridden method
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the issue, the Reshape
method in the Opset23
class must be updated to match the signature of the Reshape
method in the Opset22
class. This involves ensuring that the Reshape
method in Opset23
accepts all the parameters that the Reshape
method in Opset22
does. If the parent class's method has additional parameters, they should be added to the overriding method in Opset23
. The functionality of the Reshape
method in Opset23
should remain consistent with its intended behavior.
-
Copy modified line R1545
@@ -1544,3 +1544,3 @@ | ||
|
||
def Reshape(self, data: T_Reshape, shape: INT64, *, allowzero: int = 0) -> T_Reshape: | ||
def Reshape(self, data: T_Reshape, shape: INT64, *, allowzero: int = 0, **kwargs) -> T_Reshape: | ||
r"""[🌐 Reshape(23)](https://onnx.ai/onnx/operators/onnx__Reshape.html#reshape-23 "Online Documentation") |
UINT8, | ||
) | ||
|
||
def Unsqueeze(self, data: T_Unsqueeze, axes: INT64) -> T_Unsqueeze: |
Check warning
Code scanning / CodeQL
Signature mismatch in overriding method Warning
overridden method
Overriding method 'Unsqueeze' has signature mismatch with
overridden method
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the issue, the Unsqueeze
method in the Opset23
class must be updated to match the signature of the Unsqueeze
method in the Opset22
class. This involves:
- Identifying the exact signature of the
Unsqueeze
method inOpset22
. - Modifying the
Unsqueeze
method inOpset23
to ensure it accepts the same parameters and has the same return type as the method inOpset22
.
The fix should preserve the functionality of the Unsqueeze
method in Opset23
while ensuring compatibility with the parent class.
-
Copy modified line R2215
@@ -2214,3 +2214,3 @@ | ||
|
||
def Unsqueeze(self, data: T_Unsqueeze, axes: INT64) -> T_Unsqueeze: | ||
def Unsqueeze(self, data: T_Unsqueeze, axes: Union[INT64, Sequence[INT64]]) -> T_Unsqueeze: | ||
r"""[🌐 Unsqueeze(23)](https://onnx.ai/onnx/operators/onnx__Unsqueeze.html#unsqueeze-23 "Online Documentation") |
Add opset23 support.