(self)
| 134 | ) |
| 135 | |
| 136 | def test_large_recommend(self): |
| 137 | # the GPU version of FAISS can't return more than 1K result (and will assert/exit) |
| 138 | # this tests out that we fall back in this case to the exact version and don't die |
| 139 | plays = get_checker_board(2048) |
| 140 | model = self._get_model() |
| 141 | model.fit(plays, show_progress=False) |
| 142 | |
| 143 | recs = model.similar_items(0, N=1050) |
| 144 | self.assertEqual(recs[0][0], 0) |
| 145 | |
| 146 | recs = model.recommend(0, plays.T.tocsr()[0], N=1050) |
| 147 | self.assertEqual(recs[0][0], 0) |
| 148 | |
| 149 | def test_pickle(self): |
| 150 | # pickle isn't supported on faiss indices |
nothing calls this directly
no test coverage detected