Skip to content

Commit

Permalink
Fix weekly CI pipeline errors
Browse files Browse the repository at this point in the history
1. Fix type annotation for _add_attribute_to_torchscript_node and removed runtime type checking because int like inputs are not correctly recognized by beartype
2. Fix IR test errors with latest onnx-weekly
  • Loading branch information
justinchuby committed Jul 22, 2024
1 parent 3fc6ead commit 492096e
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,19 @@ def eval_function( # type: ignore[override]
return self._graph.add_function_call(function, inputs, attributes)


@runtime_typing.checked
def _add_attribute_to_torchscript_node(
node: torch.Node,
key: str,
value: Union[float, int, str, bytes, Sequence[float], Sequence[int], torch.Tensor],
value: Union[
float,
int,
str,
bytes,
Sequence[float],
Sequence[int],
torch.Tensor,
ir.TensorProtocol,
],
):
"""Initializes the right attribute based on type of value."""
if isinstance(value, float):
Expand Down

0 comments on commit 492096e

Please sign in to comment.