facebookresearch / faiss

A library for efficient similarity search and clustering of dense vectors.
https://faiss.ai
MIT License
31.32k stars 3.63k forks source link

Install test FAILED test_residual_quantizer.py::TestCrossCodebookComputations::test_precomp - AssertionError: #3109

Closed buttercutter closed 4 months ago

buttercutter commented 1 year ago

Summary

According to the install runtime error log, the installation failed at testing stage specifically at this assertion

Platform

OS: Linux dell 6.5.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 19 Oct 2023 22:52:14 +0000 x86_64 GNU/Linux

Faiss version:

Installed from: yay -S python-faiss-git ( https://aur.archlinux.org/packages/python-faiss-git )

Faiss compilation options: None

Running on:

Interface:

Reproduction instructions

Running tests...
Test project /home/phung/.cache/yay/faiss-git/src/faiss/build
        Start   1: BinaryFlat.accuracy
  1/104 Test   #1: BinaryFlat.accuracy ..................................   Passed    0.68 sec
        Start   2: TestIvlistDealloc.IVFFlat
  2/104 Test   #2: TestIvlistDealloc.IVFFlat ............................   Passed    2.31 sec
        Start   3: TestIvlistDealloc.IVFSQ
  3/104 Test   #3: TestIvlistDealloc.IVFSQ ..............................   Passed    2.59 sec
        Start   4: TestIvlistDealloc.IVFPQ
  4/104 Test   #4: TestIvlistDealloc.IVFPQ ..............................   Passed    8.54 sec
        Start   5: IVFPQ.codec
  5/104 Test   #5: IVFPQ.codec ..........................................   Passed   28.80 sec
        Start   6: IVFPQ.accuracy
  6/104 Test   #6: IVFPQ.accuracy .......................................   Passed   12.83 sec
        Start   7: TestLowLevelIVF.IVFFlatL2
  7/104 Test   #7: TestLowLevelIVF.IVFFlatL2 ............................   Passed    2.66 sec
        Start   8: TestLowLevelIVF.PCAIVFFlatL2
  8/104 Test   #8: TestLowLevelIVF.PCAIVFFlatL2 .........................   Passed    2.11 sec
        Start   9: TestLowLevelIVF.IVFFlatIP
  9/104 Test   #9: TestLowLevelIVF.IVFFlatIP ............................   Passed    1.71 sec
        Start  10: TestLowLevelIVF.IVFSQL2
 10/104 Test  #10: TestLowLevelIVF.IVFSQL2 ..............................   Passed    1.92 sec
        Start  11: TestLowLevelIVF.IVFSQIP
 11/104 Test  #11: TestLowLevelIVF.IVFSQIP ..............................   Passed    2.29 sec
        Start  12: TestLowLevelIVF.IVFPQL2
 12/104 Test  #12: TestLowLevelIVF.IVFPQL2 ..............................   Passed    7.71 sec
        Start  13: TestLowLevelIVF.IVFPQIP
 13/104 Test  #13: TestLowLevelIVF.IVFPQIP ..............................   Passed   10.86 sec
        Start  14: TestLowLevelIVF.IVFBinary
 14/104 Test  #14: TestLowLevelIVF.IVFBinary ............................   Passed    3.38 sec
        Start  15: TestLowLevelIVF.ThreadedSearch
 15/104 Test  #15: TestLowLevelIVF.ThreadedSearch .......................   Passed    0.88 sec
        Start  16: MERGE.merge_flat_no_ids
 16/104 Test  #16: MERGE.merge_flat_no_ids ..............................   Passed    0.54 sec
        Start  17: MERGE.merge_flat
 17/104 Test  #17: MERGE.merge_flat .....................................   Passed    1.59 sec
        Start  18: MERGE.merge_flat_vt
 18/104 Test  #18: MERGE.merge_flat_vt ..................................   Passed    1.43 sec
        Start  19: MERGE.merge_flat_ondisk
 19/104 Test  #19: MERGE.merge_flat_ondisk ..............................   Passed    0.73 sec
        Start  20: MERGE.merge_flat_ondisk_2
 20/104 Test  #20: MERGE.merge_flat_ondisk_2 ............................   Passed    0.60 sec
        Start  21: Threading.openmp
 21/104 Test  #21: Threading.openmp .....................................   Passed    1.12 sec
        Start  22: ONDISK.make_invlists
 22/104 Test  #22: ONDISK.make_invlists .................................   Passed    1.30 sec
        Start  23: ONDISK.test_add
 23/104 Test  #23: ONDISK.test_add ......................................   Passed    0.81 sec
        Start  24: ONDISK.make_invlists_threaded
 24/104 Test  #24: ONDISK.make_invlists_threaded ........................   Passed    2.00 sec
        Start  25: testSearchCentroid.IVFFlat
 25/104 Test  #25: testSearchCentroid.IVFFlat ...........................   Passed    1.74 sec
        Start  26: testSearchCentroid.PCAIVFFlat
 26/104 Test  #26: testSearchCentroid.PCAIVFFlat ........................   Passed    2.10 sec
        Start  27: testSearchAndReturnCentroids.IVFFlat
 27/104 Test  #27: testSearchAndReturnCentroids.IVFFlat .................   Passed    2.07 sec
        Start  28: testSearchAndReturnCentroids.PCAIVFFlat
 28/104 Test  #28: testSearchAndReturnCentroids.PCAIVFFlat ..............   Passed    1.23 sec
        Start  29: TPO.IVFFlat
 29/104 Test  #29: TPO.IVFFlat ..........................................   Passed    2.27 sec
        Start  30: TPO.IVFPQ
 30/104 Test  #30: TPO.IVFPQ ............................................   Passed   11.12 sec
        Start  31: TPO.IVFSQ
 31/104 Test  #31: TPO.IVFSQ ............................................   Passed    0.21 sec
        Start  32: TPO.IVFFlatPP
 32/104 Test  #32: TPO.IVFFlatPP ........................................   Passed    1.18 sec
        Start  33: TSEL.IVFFlat
 33/104 Test  #33: TSEL.IVFFlat .........................................   Passed    2.55 sec
        Start  34: TSEL.IVFFPQ
 34/104 Test  #34: TSEL.IVFFPQ ..........................................   Passed    1.29 sec
        Start  35: TSEL.IVFFSQ
 35/104 Test  #35: TSEL.IVFFSQ ..........................................   Passed    2.91 sec
        Start  36: TPOB.IVF
 36/104 Test  #36: TPOB.IVF .............................................   Passed    1.11 sec
        Start  37: PQEncoderGeneric.encode
 37/104 Test  #37: PQEncoderGeneric.encode ..............................   Passed    1.03 sec
        Start  38: PQEncoder8.encode
 38/104 Test  #38: PQEncoder8.encode ....................................   Passed    1.25 sec
        Start  39: PQEncoder16.encode
 39/104 Test  #39: PQEncoder16.encode ...................................   Passed    1.08 sec
        Start  40: PQFastScan.set_packed_element
 40/104 Test  #40: PQFastScan.set_packed_element ........................   Passed    1.97 sec
        Start  41: SlidingWindow.IVFFlat
 41/104 Test  #41: SlidingWindow.IVFFlat ................................   Passed    4.49 sec
        Start  42: SlidingWindow.PCAIVFFlat
 42/104 Test  #42: SlidingWindow.PCAIVFFlat .............................   Passed    6.21 sec
        Start  43: SlidingInvlists.IVFFlat
 43/104 Test  #43: SlidingInvlists.IVFFlat ..............................   Passed    3.95 sec
        Start  44: SlidingInvlists.PCAIVFFlat
 44/104 Test  #44: SlidingInvlists.PCAIVFFlat ...........................   Passed    6.76 sec
        Start  45: ThreadedIndex.SingleException
 45/104 Test  #45: ThreadedIndex.SingleException ........................   Passed    1.74 sec
        Start  46: ThreadedIndex.MultipleException
 46/104 Test  #46: ThreadedIndex.MultipleException ......................   Passed    1.68 sec
        Start  47: ThreadedIndex.TestReplica
 47/104 Test  #47: ThreadedIndex.TestReplica ............................   Passed    0.51 sec
        Start  48: ThreadedIndex.TestShards
 48/104 Test  #48: ThreadedIndex.TestShards .............................   Passed    0.86 sec
        Start  49: TRANS.IVFFlat
 49/104 Test  #49: TRANS.IVFFlat ........................................   Passed    1.60 sec
        Start  50: TRANS.IVFFlatPreproc
 50/104 Test  #50: TRANS.IVFFlatPreproc .................................   Passed    2.82 sec
        Start  51: MEM_LEAK.ivfflat
 51/104 Test  #51: MEM_LEAK.ivfflat .....................................   Passed  175.65 sec
        Start  52: testCppcontribSaDecode.D256_IVF256_PQ16
 52/104 Test  #52: testCppcontribSaDecode.D256_IVF256_PQ16 ..............   Passed    3.64 sec
        Start  53: testCppcontribSaDecode.D256_IVF256_PQ8
 53/104 Test  #53: testCppcontribSaDecode.D256_IVF256_PQ8 ...............   Passed    0.86 sec
        Start  54: testCppcontribSaDecode.D192_IVF256_PQ24
 54/104 Test  #54: testCppcontribSaDecode.D192_IVF256_PQ24 ..............   Passed    3.58 sec
        Start  55: testCppcontribSaDecode.D192_IVF256_PQ16
 55/104 Test  #55: testCppcontribSaDecode.D192_IVF256_PQ16 ..............   Passed    1.39 sec
        Start  56: testCppcontribSaDecode.D192_IVF256_PQ12
 56/104 Test  #56: testCppcontribSaDecode.D192_IVF256_PQ12 ..............   Passed    3.88 sec
        Start  57: testCppcontribSaDecode.D160_IVF256_PQ40
 57/104 Test  #57: testCppcontribSaDecode.D160_IVF256_PQ40 ..............   Passed    1.15 sec
        Start  58: testCppcontribSaDecode.D160_IVF256_PQ20
 58/104 Test  #58: testCppcontribSaDecode.D160_IVF256_PQ20 ..............   Passed    0.46 sec
        Start  59: testCppcontribSaDecode.D160_IVF256_PQ10
 59/104 Test  #59: testCppcontribSaDecode.D160_IVF256_PQ10 ..............   Passed    1.31 sec
        Start  60: testCppcontribSaDecode.D160_IVF256_PQ8
 60/104 Test  #60: testCppcontribSaDecode.D160_IVF256_PQ8 ...............   Passed    0.13 sec
        Start  61: testCppcontribSaDecode.D128_IVF256_PQ8
 61/104 Test  #61: testCppcontribSaDecode.D128_IVF256_PQ8 ...............   Passed    3.15 sec
        Start  62: testCppcontribSaDecode.D128_IVF256_PQ4
 62/104 Test  #62: testCppcontribSaDecode.D128_IVF256_PQ4 ...............   Passed    0.72 sec
        Start  63: testCppcontribSaDecode.D64_IVF256_PQ16
 63/104 Test  #63: testCppcontribSaDecode.D64_IVF256_PQ16 ...............   Passed    0.16 sec
        Start  64: testCppcontribSaDecode.D64_IVF256_PQ8
 64/104 Test  #64: testCppcontribSaDecode.D64_IVF256_PQ8 ................   Passed    4.14 sec
        Start  65: testCppcontribSaDecode.D256_Residual4x8_PQ16
 65/104 Test  #65: testCppcontribSaDecode.D256_Residual4x8_PQ16 .........   Passed    0.23 sec
        Start  66: testCppcontribSaDecode.D256_Residual4x8_PQ8
 66/104 Test  #66: testCppcontribSaDecode.D256_Residual4x8_PQ8 ..........   Passed    3.12 sec
        Start  67: testCppcontribSaDecode.D160_Residual4x8_PQ10
 67/104 Test  #67: testCppcontribSaDecode.D160_Residual4x8_PQ10 .........   Passed    2.68 sec
        Start  68: testCppcontribSaDecode.D160_Residual2x8_PQ10
 68/104 Test  #68: testCppcontribSaDecode.D160_Residual2x8_PQ10 .........   Passed    1.14 sec
        Start  69: testCppcontribSaDecode.D160_Residual1x8_PQ10
 69/104 Test  #69: testCppcontribSaDecode.D160_Residual1x8_PQ10 .........   Passed    0.57 sec
        Start  70: testCppcontribSaDecode.D128_Residual4x8_PQ8
 70/104 Test  #70: testCppcontribSaDecode.D128_Residual4x8_PQ8 ..........   Passed    0.17 sec
        Start  71: testCppcontribSaDecode.D128_Residual4x8_PQ4
 71/104 Test  #71: testCppcontribSaDecode.D128_Residual4x8_PQ4 ..........   Passed    0.12 sec
        Start  72: testCppcontribSaDecode.D64_Residual4x8_PQ8
 72/104 Test  #72: testCppcontribSaDecode.D64_Residual4x8_PQ8 ...........   Passed    0.03 sec
        Start  73: testCppcontribSaDecode.D64_Residual4x8_PQ4
 73/104 Test  #73: testCppcontribSaDecode.D64_Residual4x8_PQ4 ...........   Passed    0.16 sec
        Start  74: testCppcontribSaDecode.D256_IVF1024_PQ16
 74/104 Test  #74: testCppcontribSaDecode.D256_IVF1024_PQ16 .............   Passed   27.91 sec
        Start  75: testCppcontribSaDecode.D64_Residual1x9_PQ8
 75/104 Test  #75: testCppcontribSaDecode.D64_Residual1x9_PQ8 ...........   Passed    4.41 sec
        Start  76: testCppcontribSaDecode.D256_PQ16
 76/104 Test  #76: testCppcontribSaDecode.D256_PQ16 .....................   Passed    1.99 sec
        Start  77: testCppcontribSaDecode.D160_PQ20
 77/104 Test  #77: testCppcontribSaDecode.D160_PQ20 .....................   Passed    1.19 sec
        Start  78: testCppcontribSaDecode.D256_MINMAXFP16_IVF256_PQ16
 78/104 Test  #78: testCppcontribSaDecode.D256_MINMAXFP16_IVF256_PQ16 ...   Passed    1.64 sec
        Start  79: testCppcontribSaDecode.D256_MINMAXFP16_PQ16
 79/104 Test  #79: testCppcontribSaDecode.D256_MINMAXFP16_PQ16 ..........   Passed    1.04 sec
        Start  80: testCppcontribSaDecode.D256_MINMAX_IVF256_PQ16
 80/104 Test  #80: testCppcontribSaDecode.D256_MINMAX_IVF256_PQ16 .......   Passed    1.86 sec
        Start  81: testCppcontribSaDecode.D256_MINMAX_PQ16
 81/104 Test  #81: testCppcontribSaDecode.D256_MINMAX_PQ16 ..............   Passed    1.59 sec
        Start  82: testCppcontribUintreader.Test8bit
 82/104 Test  #82: testCppcontribUintreader.Test8bit ....................   Passed    0.30 sec
        Start  83: testCppcontribUintreader.Test10bit
 83/104 Test  #83: testCppcontribUintreader.Test10bit ...................   Passed    1.25 sec
        Start  84: testCppcontribUintreader.Test12bit
 84/104 Test  #84: testCppcontribUintreader.Test12bit ...................   Passed    0.77 sec
        Start  85: testCppcontribUintreader.Test16bit
 85/104 Test  #85: testCppcontribUintreader.Test16bit ...................   Passed    1.14 sec
        Start  86: TestSIMDLib.TestCmpltAndBlendInplace
 86/104 Test  #86: TestSIMDLib.TestCmpltAndBlendInplace .................   Passed    0.87 sec
        Start  87: TestSIMDLib.TestCmpltMinMaxFloat
 87/104 Test  #87: TestSIMDLib.TestCmpltMinMaxFloat .....................   Passed    0.46 sec
        Start  88: TestSIMDLib.TestCmpltMinMaxInt
 88/104 Test  #88: TestSIMDLib.TestCmpltMinMaxInt .......................   Passed    0.77 sec
        Start  89: TestSIMDLib.TestCmpltMinMaxInt16
 89/104 Test  #89: TestSIMDLib.TestCmpltMinMaxInt16 .....................   Passed    0.28 sec
        Start  90: testApproxTopk.COMMON
 90/104 Test  #90: testApproxTopk.COMMON ................................   Passed    1.18 sec
        Start  91: RCQCropping.test_cropping
 91/104 Test  #91: RCQCropping.test_cropping ............................   Passed    3.02 sec
        Start  92: RCQCropping.search_params
 92/104 Test  #92: RCQCropping.search_params ............................   Passed    6.01 sec
        Start  93: TestFvecL2sqrNy.D2
 93/104 Test  #93: TestFvecL2sqrNy.D2 ...................................   Passed    0.09 sec
        Start  94: TestFvecInnerProductsNy.D2
 94/104 Test  #94: TestFvecInnerProductsNy.D2 ...........................   Passed    0.74 sec
        Start  95: Heap.addn_with_ids
 95/104 Test  #95: Heap.addn_with_ids ...................................   Passed    0.59 sec
        Start  96: Heap.addn_query_subset_with_ids
 96/104 Test  #96: Heap.addn_query_subset_with_ids ......................   Passed    0.54 sec
        Start  97: TestCodeDistance.SUBQ4_NBITS8
 97/104 Test  #97: TestCodeDistance.SUBQ4_NBITS8 ........................   Passed    1.08 sec
        Start  98: TestCodeDistance.SUBQ8_NBITS8
 98/104 Test  #98: TestCodeDistance.SUBQ8_NBITS8 ........................   Passed    1.34 sec
        Start  99: TestCodeDistance.SUBQ16_NBITS8
 99/104 Test  #99: TestCodeDistance.SUBQ16_NBITS8 .......................   Passed    1.35 sec
        Start 100: TestCodeDistance.SUBQ32_NBITS8
100/104 Test #100: TestCodeDistance.SUBQ32_NBITS8 .......................   Passed    1.77 sec
        Start 101: HNSW.Test_popmin
101/104 Test #101: HNSW.Test_popmin .....................................   Passed    0.53 sec
        Start 102: HNSW.Test_popmin_identical_distances
102/104 Test #102: HNSW.Test_popmin_identical_distances .................   Passed    1.18 sec
        Start 103: HNSW.Test_popmin_infinite_distances
103/104 Test #103: HNSW.Test_popmin_infinite_distances ..................   Passed    0.68 sec
        Start 104: TestPartitioning.TestPartitioningBigRange
104/104 Test #104: TestPartitioning.TestPartitioningBigRange ............   Passed    1.22 sec

100% tests passed, 0 tests failed out of 104

Total Test time (real) = 442.43 sec
================================================ test session starts ================================================
platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0
rootdir: /home/phung/.cache/yay/faiss-git/src/faiss/tests
plugins: requests-mock-1.11.0, anyio-3.7.1
collected 808 items                                                                                                 

test_autotune.py .....                                                                                        [  0%]
test_binary_factory.py ......                                                                                 [  1%]
test_binary_hashindex.py ......                                                                               [  2%]
test_binary_io.py ......                                                                                      [  2%]
test_build_blocks.py ..................................................                                       [  9%]
test_clone.py ...........                                                                                     [ 10%]
test_clustering.py ............                                                                               [ 11%]
test_contrib.py ..............................                                                                [ 15%]
test_contrib_with_scipy.py ...                                                                                [ 15%]
test_documentation.py .                                                                                       [ 16%]
test_doxygen_documentation.py .                                                                               [ 16%]
test_extra_distances.py ..........                                                                            [ 17%]
test_factory.py ...................................                                                           [ 21%]
test_fast_scan.py .s...............................................................                           [ 29%]
test_fast_scan_ivf.py ....................................................................................... [ 40%]
....................................................................................................          [ 52%]
test_index.py ....................................................                                            [ 59%]
test_index_accuracy.py ..............................                                                         [ 63%]
test_index_binary.py ...............                                                                          [ 64%]
test_index_binary_from_float.py .....                                                                         [ 65%]
test_index_composite.py ...............................                                                       [ 69%]
test_io.py ..............                                                                                     [ 71%]
test_ivflib.py .....                                                                                          [ 71%]
test_local_search_quantizer.py .........................                                                      [ 74%]
test_merge_index.py ...............                                                                           [ 76%]
test_meta_index.py .....                                                                                      [ 77%]
test_omp_threads_py.py .                                                                                      [ 77%]
test_oom_exception.py .                                                                                       [ 77%]
test_partition.py ...................................................                                         [ 83%]
test_product_quantizer.py .............                                                                       [ 85%]
test_referenced_objects.py .........                                                                          [ 86%]
test_refine.py .........                                                                                      [ 87%]
test_residual_quantizer.py ..............................F........                                            [ 92%]
test_rowwise_minmax.py ..                                                                                     [ 92%]
test_search_params.py ..............................                                                          [ 96%]
test_standalone_codec.py ............................                                                         [100%]

===================================================== FAILURES ======================================================
____________________________________ TestCrossCodebookComputations.test_precomp _____________________________________

self = <test_residual_quantizer.TestCrossCodebookComputations testMethod=test_precomp>

    def test_precomp(self):
        ds = datasets.SyntheticDataset(32, 1000, 1000, 0)

        # make sure it work with varying nb of bits
        nbits = faiss.UInt64Vector()
        nbits.push_back(5)
        nbits.push_back(6)
        nbits.push_back(7)

        rq = faiss.ResidualQuantizer(ds.d, nbits)
        rq.train_type = faiss.ResidualQuantizer.Train_default
        rq.train(ds.get_train())

        codebooks = get_additive_quantizer_codebooks(rq)
        precomp = precomp_codebooks(codebooks)
        codebook_cross_prods_ref, cent_norms_ref = precomp

        # validate that the python tab-based encoding works
        xb = ds.get_database()
        ref_codes, _, _ = beam_search_encoding_ref(codebooks, xb, 7)
        new_codes, _ = beam_search_encoding_tab(codebooks, xb, 7, precomp)
        np.testing.assert_array_equal(ref_codes, new_codes)

        # check C++ precomp tables
        rq.compute_codebook_tables()
        codebook_cross_prods = faiss.vector_to_array(
            rq.codebook_cross_products)
        ofs = 0
        for m in range(1, rq.M):
            py_table = np.vstack(codebook_cross_prods_ref[m])
            kk = rq.codebook_offsets.at(m)
            K = 1 << rq.nbits.at(m)
            cpp_table = codebook_cross_prods[ofs:ofs + K * kk].reshape(kk, K)
            ofs += kk * K
>           np.testing.assert_allclose(py_table, cpp_table, rtol=2e-4)

test_residual_quantizer.py:1120: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<function assert_allclose.<locals>.compare at 0x146801d62340>, array([[ 0.19954044,  0.0473395 ,  0.26544827, ...,  0...],
       [ 1.1322111 , -0.42995447, -0.41449165, ..., -0.6706828 ,
        -0.81294894,  0.16069525]], dtype=float32))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=0.0002, atol=0', 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Not equal to tolerance rtol=0.0002, atol=0
E           
E           Mismatched elements: 3 / 12288 (0.0244%)
E           Max absolute difference: 7.1525574e-07
E           Max relative difference: 0.00123884
E            x: array([[ 0.19954 ,  0.047339,  0.265448, ...,  0.055388,  1.47067 ,
E                   -0.30842 ],
E                  [-0.003876,  0.554926,  0.302615, ...,  0.065597, -1.44773 ,...
E            y: array([[ 0.19954 ,  0.04734 ,  0.265448, ...,  0.055388,  1.47067 ,
E                   -0.308421],
E                  [-0.003876,  0.554926,  0.302615, ...,  0.065597, -1.44773 ,...

/usr/lib/python3.11/contextlib.py:81: AssertionError
----------------------------------------------- Captured stderr call ------------------------------------------------
WARNING clustering 1000 points to 32 centroids: please provide at least 1248 training points
================================================= warnings summary ==================================================
../build/faiss/python/faiss/loader.py:28
  /home/phung/.cache/yay/faiss-git/src/faiss/build/faiss/python/faiss/loader.py:28: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(numpy.__version__) >= "1.19":

../../../../../../../../usr/lib/python3.11/site-packages/setuptools/_distutils/version.py:345
  /usr/lib/python3.11/site-packages/setuptools/_distutils/version.py:345: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    other = LooseVersion(other)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================== short test summary info ==============================================
FAILED test_residual_quantizer.py::TestCrossCodebookComputations::test_precomp - AssertionError: 
========================= 1 failed, 806 passed, 1 skipped, 2 warnings in 176.99s (0:02:56) ==========================

Training ResidualQuantizer, with 4 steps on 3000 32D vectors
[0.006 s, 0.005 s clustering] train stage 0, 6 bits, kmeans objective 33217.3, total distance 200231, beam_size 1->5 (batch size 3000)
[0.032 s, 0.028 s clustering] train stage 1, 6 bits, kmeans objective 155050, total distance 143425, beam_size 5->5 (batch size 3000)
[0.057 s, 0.051 s clustering] train stage 2, 6 bits, kmeans objective 112965, total distance 107746, beam_size 5->5 (batch size 3000)
[0.083 s, 0.074 s clustering] train stage 3, 6 bits, kmeans objective 85549.6, total distance 81995.9, beam_size 5->5 (batch size 3000)
[0.000 s] encode stage 0, 6 bits, total error 67433, beam_size 5
[0.001 s] encode stage 1, 6 bits, total error 51657.3, beam_size 5
[0.002 s] encode stage 2, 6 bits, total error 40562.2, beam_size 5
[0.003 s] encode stage 3, 6 bits, total error 32055.1, beam_size 5
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: faiss-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-faiss-git - exit status 4
alexmelekhin commented 1 year ago

The same issue while running Python testing suite (as in install instruction):

FAISS library version: commit c3b9374 (currently the latest from main branch)

mdouze commented 1 year ago

The error does not seem too problematic, there are just a few values that exceed the threshold. You can probably relax the text.

junjieqi commented 4 months ago

If we hit this issue, we could relax the threshold and close for now