Forward fix internal pyre failure from D58983461

Summary:
X-link: https://github.com/pytorch/pytorch/pull/129525

Somehow, using underscore alias of some builtin types breaks pyre

Reviewed By: malfet, clee2000

Differential Revision: D59029768

fbshipit-source-id: cfa2171b66475727b9545355e57a8297c1dc0bc6
This commit is contained in:
Huy Do
2024-06-27 07:35:18 -07:00
committed by Facebook GitHub Bot
parent 89653419d0
commit 51fd114d8b
5 changed files with 5 additions and 8 deletions

View File

@@ -121,7 +121,6 @@ def weighted_sum_losses(
return None
loss = sum(losses_weighted)
assert torch.is_tensor(loss)
# pyre-fixme[7]: Expected `Optional[Tensor]` but got `int`.
return loss