mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-21 14:12:42 +02:00
Added env var to skip warm up (#3633)
This commit is contained in:
@@ -12,6 +12,7 @@ from requests import Response
|
||||
from retry import retry
|
||||
|
||||
from onyx.configs.app_configs import LARGE_CHUNK_RATIO
|
||||
from onyx.configs.app_configs import SKIP_WARM_UP
|
||||
from onyx.configs.model_configs import BATCH_SIZE_ENCODE_CHUNKS
|
||||
from onyx.configs.model_configs import (
|
||||
BATCH_SIZE_ENCODE_CHUNKS_FOR_API_EMBEDDING_SERVICES,
|
||||
@@ -384,6 +385,9 @@ def warm_up_bi_encoder(
|
||||
embedding_model: EmbeddingModel,
|
||||
non_blocking: bool = False,
|
||||
) -> None:
|
||||
if SKIP_WARM_UP:
|
||||
return
|
||||
|
||||
warm_up_str = " ".join(WARM_UP_STRINGS)
|
||||
|
||||
logger.debug(f"Warming up encoder model: {embedding_model.model_name}")
|
||||
|
Reference in New Issue
Block a user