Update Optional[x] -> x | None and Union[x, y] to x | y (#26633)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-12 09:51:31 -07:00
committed by GitHub
parent 9bb38130cb
commit 8fcaaf6a16
944 changed files with 9490 additions and 10121 deletions
+1 -2
View File
@@ -9,7 +9,6 @@
# license agreement from NVIDIA CORPORATION is strictly prohibited.
import typing
from typing import Union
import torch
@@ -38,7 +37,7 @@ def compute_retained_tokens_count(
def compute_retention_mask(
video_embeds: torch.Tensor,
video_size_thw: Union[torch.LongTensor, tuple[int, int, int]],
video_size_thw: torch.LongTensor | tuple[int, int, int],
spatial_merge_size: int,
q: float,
) -> torch.Tensor: