Update deprecated type hinting in models (#18132)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-05-14 22:06:50 -07:00
committed by GitHub
parent 83f74c698f
commit 26d0419309
130 changed files with 971 additions and 901 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
# but implemented by the Phi-Speech team
#!/usr/bin/env python3
import math
from typing import Optional, Tuple, Union
from typing import Optional, Union
import torch
import torch.nn.functional as F
@@ -1586,7 +1586,7 @@ class AttModule(nn.Module):
memory: Optional[Tensor] = None,
pos_emb: Optional[Tensor] = None,
att_mask: Optional[Tensor] = None,
) -> Tuple[Tensor, Tensor, Optional[Tensor], Optional[Tensor]]:
) -> tuple[Tensor, Tensor, Optional[Tensor], Optional[Tensor]]:
"""AttModule forward
Args: