File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
hindsight-api/hindsight_api/engine Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -400,8 +400,10 @@ def __init__(
400400 self ._cross_encoder_reranker = CrossEncoderReranker (cross_encoder = cross_encoder )
401401
402402 # Initialize task backend
403- _task_batch_size = task_batch_size if task_batch_size is not None else config .task_batch_size
404- _task_batch_interval = task_batch_interval if task_batch_interval is not None else config .task_batch_interval
403+ _task_batch_size = task_batch_size if task_batch_size is not None else config .task_backend_memory_batch_size
404+ _task_batch_interval = (
405+ task_batch_interval if task_batch_interval is not None else config .task_backend_memory_batch_interval
406+ )
405407 self ._task_backend = task_backend or AsyncIOQueueBackend (
406408 batch_size = _task_batch_size , batch_interval = _task_batch_interval
407409 )
@@ -1885,7 +1887,7 @@ def to_tuple_format(results):
18851887 await reranker_instance .ensure_initialized ()
18861888
18871889 # Rerank using cross-encoder
1888- scored_results = reranker_instance .rerank (query , merged_candidates )
1890+ scored_results = await reranker_instance .rerank (query , merged_candidates )
18891891
18901892 step_duration = time .time () - step_start
18911893 log_buffer .append (f" [4] Reranking: { len (scored_results )} candidates scored in { step_duration :.3f} s" )
You can’t perform that action at this time.
0 commit comments