Skip to content

Commit

Permalink
rel=1e-3
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Aug 24, 2024
1 parent 07fad42 commit 109057d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test-loadable.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def test_lembed():
).fetchone()[0]
a = lembed("aaa", "alex garcia")
assert len(a) == (384 * 4)
assert struct.unpack("1f", a[0:4])[0] == pytest.approx(-0.09205757826566696)
assert struct.unpack("1f", a[0:4])[0] == pytest.approx(
-0.09205757826566696, rel=1e-3
)

with _raises(
"Unknown model name 'aaaaaaaaa'. Was it registered with lembed_models?"
Expand All @@ -135,7 +137,9 @@ def test_lembed():
)
a = lembed("alex garcia")
assert len(a) == (384 * 4)
assert struct.unpack("1f", a[0:4])[0] == pytest.approx(-0.09205757826566696)
assert struct.unpack("1f", a[0:4])[0] == pytest.approx(
-0.09205757826566696, rel=1e-3
)


@pytest.mark.skip(reason="TODO")
Expand Down

0 comments on commit 109057d

Please sign in to comment.