Skip to content

Commit f27c8b0

Browse files
Fix assertions in GPU tests (#1905)
1 parent 71310a3 commit f27c8b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inference_models/tests/integration_tests/models/test_sam_predictions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_sam_predictions_without_prompting_batch_numpy(
7676
assert np.allclose(
7777
results[1].scores.cpu().numpy(), np.array([0.8682, 0.7068, 0.4445]), atol=0.01
7878
)
79-
assert 724600 <= results[1].masks[0].cpu().sum() <= 725000
79+
assert 724500 <= results[1].masks[0].cpu().sum() <= 725000
8080

8181

8282
@pytest.mark.slow
@@ -118,7 +118,7 @@ def test_sam_predictions_without_prompting_batch_torch(
118118
assert np.allclose(
119119
results[1].scores.cpu().numpy(), np.array([0.8682, 0.7068, 0.4445]), atol=0.01
120120
)
121-
assert 724600 <= results[1].masks[0].cpu().sum() <= 725000
121+
assert 724500 <= results[1].masks[0].cpu().sum() <= 725000
122122

123123

124124
@pytest.mark.slow
@@ -266,7 +266,7 @@ def test_sam_predictions_with_box_prompting_and_embeddings(
266266
np.array([0.97505486, 0.96572363, 0.9098512]),
267267
atol=0.01,
268268
)
269-
assert 31300 <= results[1].masks[2].cpu().sum() <= 31500
269+
assert 31200 <= results[1].masks[2].cpu().sum() <= 31500
270270

271271

272272
@pytest.mark.slow

0 commit comments

Comments
 (0)