Skip to content

Commit

Permalink
Fix no-redef mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
mavlyutovr committed Sep 5, 2023
1 parent 65617b6 commit cee7518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/m4t/finetune/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def _batch_tensors(self, tensors: List[Tensor], pad_value: Any) -> Tensor:
padded_tensors.append(pad_tensor(tensor, padding, "constant", pad_value))
return torch.stack([tensor for tensor in padded_tensors], dim=0)

def _prepare_batch(self, samples: List[Dict[str, Any]]) -> MultimodalSeqsBatch:
samples = [LangPairSample.from_json(sample) for sample in samples]
def _prepare_batch(self, raw_samples: List[Dict[str, Any]]) -> MultimodalSeqsBatch:
samples = [LangPairSample.from_json(sample) for sample in raw_samples]
# input speech
src_tokens_list = [self._get_source_fbank(sample) for sample in samples]
src_tokens = self._batch_tensors(
Expand Down

0 comments on commit cee7518

Please sign in to comment.