Spaces:
Sleeping
Sleeping
Update services/embed_service/utils.py
Browse files
services/embed_service/utils.py
CHANGED
@@ -188,8 +188,10 @@ class DocumentEmbedder:
|
|
188 |
|
189 |
# run pinecone in batches (of 1) for memory preservation.
|
190 |
print("reading into pinecone db")
|
|
|
191 |
batchsize = 1
|
192 |
for i in range(0, len(results), batchsize):
|
|
|
193 |
gc.collect()
|
194 |
batch = self.pipeline.run(documents=results[i:i+batchsize])
|
195 |
print("completed batch %s" % ((i+batchsize)/batchsize))
|
|
|
188 |
|
189 |
# run pinecone in batches (of 1) for memory preservation.
|
190 |
print("reading into pinecone db")
|
191 |
+
print(self.pipeline)
|
192 |
batchsize = 1
|
193 |
for i in range(0, len(results), batchsize):
|
194 |
+
print(results[i:i+batchsize])
|
195 |
gc.collect()
|
196 |
batch = self.pipeline.run(documents=results[i:i+batchsize])
|
197 |
print("completed batch %s" % ((i+batchsize)/batchsize))
|