Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
move set seeed
  • Loading branch information
Greg Friedland committed Feb 21, 2019
1 parent 0f26eb3 commit 03071c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python_bindings/tests/jaccard_comparison.py
Expand Up @@ -132,6 +132,7 @@ def bit_vector_sparse_str(bit_vect):


def run(space, num_elems, nbits):
np.random.seed(23)
if space == "bit_jaccard":
bit_vector_str_func = bit_vector_to_str
index = nmslib.init(method='hnsw', space=space, data_type=nmslib.DataType.OBJECT_AS_STRING,
Expand All @@ -142,7 +143,6 @@ def run(space, num_elems, nbits):
dtype=nmslib.DistType.FLOAT)

with PeakMemoryUsage(f"All: space={space} nbits={nbits} elems={num_elems}"):
np.random.seed(23)
for i in range(0, num_elems, CHUNK_SIZE):
strs = []
for j in range(CHUNK_SIZE):
Expand All @@ -158,6 +158,8 @@ def run(space, num_elems, nbits):


if __name__ == "__main__":
np.set_printoptions(linewidth=500)

logging.basicConfig(level=logging.WARNING)
space = sys.argv[1]
num_elems = int(sys.argv[2])
Expand Down

0 comments on commit 03071c2

Please sign in to comment.