[ONNX] Update types in VerificationInfo (#149377)

torch.types.Number was rendered as is in the documentation and can be confusing. We write the original types instead to reduce confusion for users.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/149377
Approved by: https://github.com/titaiwangms
This commit is contained in:
Justin Chu 2025-03-18 15:37:39 +00:00 committed by PyTorch MergeBot
parent 405025778d
commit fdacf3c920

View File

@ -61,8 +61,8 @@ class VerificationInfo:
def from_tensors( def from_tensors(
cls, cls,
name: str, name: str,
expected: torch.Tensor | torch.types.Number, expected: torch.Tensor | float | int | bool,
actual: torch.Tensor | torch.types.Number, actual: torch.Tensor | float | int | bool,
) -> VerificationInfo: ) -> VerificationInfo:
"""Create a VerificationInfo object from two tensors. """Create a VerificationInfo object from two tensors.