Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbern committed Apr 16, 2023
1 parent 0a34999 commit 7780e25
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ann_benchmarks/algorithms/redisearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,11 @@ def fit(self, X):

# Insert vectors
p = self.redis.pipeline(transaction=False)
count = 0
for i, v in enumerate(X):
p.execute_command("HSET", i, "vector", v.tobytes())
count += 1
if count == 1000:
if i % 1000 == 999:
p.execute()
p.reset()
count = 0
p.execute()

def set_query_arguments(self, ef):
Expand Down

0 comments on commit 7780e25

Please sign in to comment.