add some tolerance to Roberta test (#6880)

This commit is contained in:
ZanSara 2024-01-31 17:19:07 +01:00 committed by GitHub
parent b772c1127c
commit 9af6c7e442
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -640,7 +640,7 @@ def test_roberta():
assert answers[1].data == "Angela Merkel"
assert answers[1].score == pytest.approx(0.857952892780304)
assert answers[2].data is None
assert answers[2].score == pytest.approx(0.019673851661650588)
assert answers[2].score == pytest.approx(0.019673851661650588, abs=1e-5)
assert len(answers) == 3
# uncomment assertions below when there is batching in v2
# assert answers[0][0].data == "Olaf Scholz"