Skip to content

Commit

Permalink
🐛 Fix isclose to .all
Browse files Browse the repository at this point in the history
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
  • Loading branch information
gkumbhat committed Jul 17, 2024
1 parent 0cf2c94 commit 18e2fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/modules/text_embedding/test_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ def test_encoding_order(loaded_model: EmbeddingModule, truncate_input_tokens):

# test order by comparing value of individual embeddings in sequence
for i, e in enumerate(separate_vectors):
assert np.isclose(e, combined_vectors[i])
assert np.isclose(e, combined_vectors[i], rtol=1e-05, atol=1e-08).all()

# test expected failure case by reordering
shifted_separate_vectors = separate_vectors[1:] + [separate_vectors[0]]
Expand Down

0 comments on commit 18e2fd8

Please sign in to comment.