Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Test tolerance issues: test_faiss_flat_dense_with_normalized_distances #2351

@lintool

Description

@lintool

hi @FarmersWrap - on linux.cs I'm getting:

======================================================================
FAIL: test_faiss_flat_dense_with_normalized_distances (optional.test_nfcorpus_faiss.TestNFCorpus.test_faiss_flat_dense_with_normalized_distances)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/u4/jimmylin/pyserini/tests/optional/test_nfcorpus_faiss.py", line 144, in test_faiss_flat_dense_with_normalized_distances
    self.assertEqual(line, expected_top10[i], f"Faiss result {i+1} should match expected")
AssertionError: 'PLAIN-1008 Q0 MED-2036 1 0.776562 Faiss' != 'PLAIN-1008 Q0 MED-2036 1 0.776563 Faiss'
- PLAIN-1008 Q0 MED-2036 1 0.776562 Faiss
?                                 ^
+ PLAIN-1008 Q0 MED-2036 1 0.776563 Faiss
?                                 ^
 : Faiss result 1 should match expected

Tiny differences, but can we make the test case more resilient to small differences?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions