Fix issue probably-meant-fstring found at https://codereview.doctor (#16913)

This commit is contained in:
code-review-doctor
2022-04-25 20:15:00 +01:00
committed by GitHub
parent fea94d6790
commit 6568752039
11 changed files with 12 additions and 12 deletions

View File

@@ -639,7 +639,7 @@ class BARTBeamSearchGenerator(BARTGenerator):
assert (
num_beams * batch_size == batch_beam_size
), "Batch dimension of `input_ids` should be {num_beams * batch_size}, but is {batch_beam_size}."
), f"Batch dimension of `input_ids` should be {num_beams * batch_size}, but is {batch_beam_size}."
beam_scores = torch.zeros((batch_size, num_beams), dtype=torch.float, device=input_ids.device)
beam_scores[:, 1:] = -1e9