From 28e441b7d5dd689b51bf94cb30d38402ad85028a Mon Sep 17 00:00:00 2001 From: Riccardo Orlando Date: Tue, 6 Aug 2024 15:28:30 +0200 Subject: [PATCH] Add skip_metadata parameter to `RelikServer` --- relik/inference/serve/backend/fastapi_be.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/relik/inference/serve/backend/fastapi_be.py b/relik/inference/serve/backend/fastapi_be.py index 6698bfe..aec3313 100644 --- a/relik/inference/serve/backend/fastapi_be.py +++ b/relik/inference/serve/backend/fastapi_be.py @@ -52,6 +52,7 @@ def __init__( document_index_precision: str | int | torch.dtype | None = None, reader_precision: str | int | torch.dtype | None = None, annotation_type: str = "char", + skip_metadata: bool = False, **kwargs, ): num_threads = os.getenv("TORCH_NUM_THREADS", psutil.cpu_count(logical=False)) @@ -95,7 +96,7 @@ def __init__( retriever_precision=self.retriever_precision, document_index_precision=self.document_index_precision, reader_precision=self.reader_precision, - skip_metadata=True, + skip_metadata=skip_metadata, ) self.router = APIRouter()