From 53510060a93e22c5891d7fd4e6d1f693398fd280 Mon Sep 17 00:00:00 2001 From: bclavie Date: Sun, 14 Jan 2024 23:27:22 +0100 Subject: [PATCH] chore: Pass self.config.avoid_fork_if_possible = True --- ragatouille/models/colbert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ragatouille/models/colbert.py b/ragatouille/models/colbert.py index 91fbb23..fdd2a20 100644 --- a/ragatouille/models/colbert.py +++ b/ragatouille/models/colbert.py @@ -192,6 +192,9 @@ def index( self.config = ColBERTConfig.from_existing( self.config, ColBERTConfig(nbits=nbits) ) + + # Instruct colbert-ai to disable forking if nranks == 1 + self.config.avoid_fork_if_possible = True self.indexer = Indexer( checkpoint=self.checkpoint, config=self.config,