"examples/vscode:/vscode.git/clone" did not exist on "d24a523130cab1ec905a7b4c41d752e4d56fb851"
Commit b1ba03e0 authored by Sylvain Gugger's avatar Sylvain Gugger
Browse files

Fix quality

parent eed3186b
......@@ -318,7 +318,7 @@ class ConstrainedBeamSearchTester:
beam_hyp.add(input_ids[beam_idx], -10.0 + float(beam_idx))
# -10.0 is removed => -9.0 is worst score
self.parent.assertAlmostEqual(beam_hyp.worst_score, -9.0 / (self.sequence_length ** beam_hyp.length_penalty))
self.parent.assertAlmostEqual(beam_hyp.worst_score, -9.0 / (self.sequence_length**beam_hyp.length_penalty))
# -5.0 is better than worst score => should not be finished
self.parent.assertFalse(beam_hyp.is_done(-5.0, self.sequence_length))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment