Skip to content

Commit

Permalink
Reduce expected error tolerance to make test pass (#1329)
Browse files Browse the repository at this point in the history
* Reduce expected error tolerance to make test pass

* Use absolute tolerance instead of relative tolerance
  • Loading branch information
IgorSusmelj authored Jul 20, 2023
1 parent 775829b commit 3e5ce97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/embedding/test_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def test_embed_correct_order(self):
device=device,
)

np.testing.assert_allclose(embeddings_1_worker, embeddings_4_worker, rtol=5e-5)
np.testing.assert_allclose(labels_1_worker, labels_4_worker, rtol=1e-5)
np.testing.assert_allclose(embeddings_1_worker, embeddings_4_worker, atol=5e-4)
np.testing.assert_allclose(labels_1_worker, labels_4_worker, atol=1e-5)

self.assertListEqual(filenames_1_worker, filenames_4_worker)
self.assertListEqual(filenames_1_worker, dataset.get_filenames())

0 comments on commit 3e5ce97

Please sign in to comment.