mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-17 00:23:09 +02:00
Moved warmup_encoders into scope (#1978)
This commit is contained in:
@ -349,16 +349,16 @@ def update_loop(
|
|||||||
check_index_swap(db_session=db_session)
|
check_index_swap(db_session=db_session)
|
||||||
db_embedding_model = get_current_db_embedding_model(db_session)
|
db_embedding_model = get_current_db_embedding_model(db_session)
|
||||||
|
|
||||||
# So that the first time users aren't surprised by really slow speed of first
|
# So that the first time users aren't surprised by really slow speed of first
|
||||||
# batch of documents indexed
|
# batch of documents indexed
|
||||||
|
|
||||||
if db_embedding_model.cloud_provider_id is None:
|
if db_embedding_model.cloud_provider_id is None:
|
||||||
logger.info("Running a first inference to warm up embedding model")
|
logger.info("Running a first inference to warm up embedding model")
|
||||||
warm_up_encoders(
|
warm_up_encoders(
|
||||||
embedding_model=db_embedding_model,
|
embedding_model=db_embedding_model,
|
||||||
model_server_host=INDEXING_MODEL_SERVER_HOST,
|
model_server_host=INDEXING_MODEL_SERVER_HOST,
|
||||||
model_server_port=MODEL_SERVER_PORT,
|
model_server_port=MODEL_SERVER_PORT,
|
||||||
)
|
)
|
||||||
|
|
||||||
client_primary: Client | SimpleJobClient
|
client_primary: Client | SimpleJobClient
|
||||||
client_secondary: Client | SimpleJobClient
|
client_secondary: Client | SimpleJobClient
|
||||||
|
Reference in New Issue
Block a user