Skip to content

Commit

Permalink
chore: Pass self.config.avoid_fork_if_possible = True (AnswerDotAI#51)
Browse files Browse the repository at this point in the history
* chore: Pass self.config.avoid_fork_if_possible = True

* chore: bump colbert version

* chore: bump version
  • Loading branch information
bclavie authored Jan 14, 2024
1 parent 47869d8 commit e84bdda
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "RAGatouille"
version = "0.0.4a4"
version = "0.0.4b"
description = "Library to facilitate the use of state-of-the-art retrieval models in common RAG contexts."
authors = ["Benjamin Clavie <[email protected]>"]
readme = "README.md"
Expand All @@ -17,7 +17,7 @@ sentence-transformers = "^2.2.2"
torch = "^2.0.1"
llama-index = "^0.9.24"
langchain_core = "^0.1.4"
colbert-ai = "^0.2.15"
colbert-ai = "^0.2.16"
langchain = "^0.1.0"
onnx = "^1.15.0"

Expand Down
2 changes: 1 addition & 1 deletion ragatouille/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.0.4a4"
__version__ = "0.0.4b"
from .RAGPretrainedModel import RAGPretrainedModel
from .RAGTrainer import RAGTrainer

Expand Down
3 changes: 3 additions & 0 deletions ragatouille/models/colbert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e84bdda

Please sign in to comment.