Skip to content

Commit

Permalink
🎨 Fix formatting
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 b53f7ab commit d621b53
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/modules/text_embedding/test_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,13 @@ def test_same_same(loaded_model: EmbeddingModule, truncate_input_tokens):
assert np.allclose(e, combined_vectors[i])

# Next ensuring that the two identical sentences yield identical results (and 3rd does not)
assert np.isclose(combined_vectors[0], combined_vectors[1], rtol=1e-05, atol=1e-08).all()
assert np.isclose(
combined_vectors[0], combined_vectors[1], rtol=1e-05, atol=1e-08
).all()
assert not np.array_equal(combined_vectors[1], combined_vectors[2])
assert np.isclose(separate_vectors[0], separate_vectors[1], rtol=1e-05, atol=1e-08).all()
assert not np.isclose(separate_vectors[1], separate_vectors[2], rtol=1e-05, atol=1e-08).all()
assert np.isclose(
separate_vectors[0], separate_vectors[1], rtol=1e-05, atol=1e-08
).all()
assert not np.isclose(
separate_vectors[1], separate_vectors[2], rtol=1e-05, atol=1e-08
).all()

0 comments on commit d621b53

Please sign in to comment.