mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE][PYFMT] migrate PYFMT for torch._dynamo
to ruff format
(#144549)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144549 Approved by: https://github.com/jansel
This commit is contained in:
committed by
PyTorch MergeBot
parent
edc5bf91d2
commit
3ce352e389
@ -140,15 +140,13 @@ def requires_bwd_pass(out: Any) -> bool:
|
||||
|
||||
|
||||
@overload
|
||||
def reduce_to_scalar_loss(out: torch.Tensor) -> torch.Tensor:
|
||||
...
|
||||
def reduce_to_scalar_loss(out: torch.Tensor) -> torch.Tensor: ...
|
||||
|
||||
|
||||
@overload
|
||||
def reduce_to_scalar_loss(
|
||||
out: Union[list[Any], tuple[Any, ...], dict[Any, Any]]
|
||||
) -> float:
|
||||
...
|
||||
out: Union[list[Any], tuple[Any, ...], dict[Any, Any]],
|
||||
) -> float: ...
|
||||
|
||||
|
||||
def reduce_to_scalar_loss(out: Any) -> Union[torch.Tensor, float]:
|
||||
|
Reference in New Issue
Block a user