Upgrade black to version ~=22.0 (#15565)

* Upgrade black to version ~=22.0

* Check copies

* Fix code
This commit is contained in:
Lysandre Debut
2022-02-09 09:28:57 -05:00
committed by GitHub
parent d923f76203
commit 7732d0fe7a
91 changed files with 208 additions and 225 deletions

View File

@@ -442,7 +442,7 @@ class BeamSearchScorerTS(torch.nn.Module):
elif self.do_early_stopping:
return True
else:
cur_score = best_sum_logprobs / cur_len ** self.length_penalty
cur_score = best_sum_logprobs / cur_len**self.length_penalty
ret = self._beam_hyps_worst_scores[hypo_idx].item() >= cur_score
return ret