Reranker Warning Log (#1299)

This commit is contained in:
Yuhong Sun 2024-04-04 06:59:48 -07:00 committed by GitHub
parent 58dc620c28
commit 33da86c802
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -267,8 +267,9 @@ class CrossEncoderEnsembleModel:
ENABLE_RERANKING_REAL_TIME_FLOW is False
and ENABLE_RERANKING_ASYNC_FLOW is False
):
raise RuntimeError(
"Should not be loading rerankers, they have been globally disabled"
logger.warning(
"Running rerankers but they are globally disabled."
"Was this specified explicitly via an API?"
)
if self.rerank_server_endpoint: