Skip to content

Commit

Permalink
return_type
Browse files Browse the repository at this point in the history
  • Loading branch information
liamhazan committed Feb 11, 2024
1 parent 8f25995 commit e423e0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fuse/data/utils/collates.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ def _pad_size(value: torch.Tensor, dim: int) -> List[int]:
return default_collate(padded_values)

@staticmethod
def crop_padding(input_ids_list: List[torch.Tensor], pad_token_id: int):
def crop_padding(
input_ids_list: List[torch.Tensor], pad_token_id: int
) -> torch.Tensor:
"""
Crop padding of a batch of input_ids tensors to the minimum length possible.
Expand Down

0 comments on commit e423e0a

Please sign in to comment.