Skip to content

Commit

Permalink
increase tolerance in flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
piskvorky committed Apr 29, 2023
1 parent ccffa84 commit 5cc2cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gensim/test/test_word2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,9 @@ def test_parallel(self):
expected_neighbor = 'palestinian'
sims = model.wv.most_similar(origin_word, topn=len(model.wv))
# the exact vectors and therefore similarities may differ, due to different thread collisions/randomization
# so let's test only for top10
# so let's test only for topN
neighbor_rank = [word for word, sim in sims].index(expected_neighbor)
self.assertLess(neighbor_rank, 5)
self.assertLess(neighbor_rank, 6)

def test_r_n_g(self):
"""Test word2vec results identical with identical RNG seed."""
Expand Down

0 comments on commit 5cc2cad

Please sign in to comment.