From 2464ef0b894c104564c288368f60a1cde2cb59df Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 27 Mar 2024 21:54:57 +0100 Subject: [PATCH] Bug fix for retrieve from faiss by prompt (#914) There was a bug in the retrieve from faiss by prompt component related to cpu. The number of workers was calculated as float instead of an int. --- .../components/retrieve_from_faiss_by_prompt/src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fondant/components/retrieve_from_faiss_by_prompt/src/main.py b/src/fondant/components/retrieve_from_faiss_by_prompt/src/main.py index 7cd18297..b514ce88 100644 --- a/src/fondant/components/retrieve_from_faiss_by_prompt/src/main.py +++ b/src/fondant/components/retrieve_from_faiss_by_prompt/src/main.py @@ -61,7 +61,7 @@ def setup(self) -> Client: # We need at least 8Gb RAM for the datacomp small faiss index # We should consider calculating the memory required for the index based on the faiss # index size - cores_to_utilise = total_memory // 8 + cores_to_utilise = int(total_memory // 8) cluster = LocalCluster( processes=True, n_workers=cores_to_utilise,