From 2d87d8c44366974bcc609e2ca81dad4c45645d9e Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Tue, 12 Mar 2024 12:18:37 +0100 Subject: [PATCH] Addresssing comments --- .../components/retrieve_from_faiss_by_prompt/src/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 05d95071..63acbc7d 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 @@ -48,12 +48,13 @@ def __init__( # PLR0913 def setup(self) -> Client: """Setup LocalCudaCluster if gpu is available.""" + dask.config.set({"dataframe.convert-string": False}) + dask.config.set({"distributed.worker.daemon": False}) + if self.device == "cuda": cluster = LocalCUDACluster() return Client(cluster) - dask.config.set({"dataframe.convert-string": False}) - dask.config.set({"distributed.worker.daemon": False}) total_memory = (os.sysconf("SC_PAGE_SIZE") * os.sysconf("SC_PHYS_PAGES")) / ( 1024**3 )