Skip to content

Commit c8dd597

Browse files
authored
fix request_output sampling_params (#3154)
1 parent 4880c16 commit c8dd597

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

fastdeploy/engine/engine.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,10 +749,6 @@ def insert_tasks(self, tasks, current_id=-1, allocated=False):
749749
"""
750750
Insert tasks to engine.
751751
"""
752-
for task in tasks:
753-
start_span_request("DEQUEUE", task, trace.SpanKind.CONSUMER)
754-
if task.sampling_params.bad_words is not None:
755-
task.sampling_params.update_from_tokenizer(self.data_processor.tokenizer)
756752
# TODO 返回至 scheduler
757753
if allocated:
758754
current_tasks = []
@@ -779,6 +775,11 @@ def insert_tasks(self, tasks, current_id=-1, allocated=False):
779775
self.engine_worker_queue.put_tasks((current_tasks, self.resource_manager.real_bsz))
780776
return True
781777

778+
for task in tasks:
779+
start_span_request("DEQUEUE", task, trace.SpanKind.CONSUMER)
780+
if task.sampling_params.bad_words is not None:
781+
task.sampling_params.update_from_tokenizer(self.data_processor.tokenizer)
782+
782783
self.resource_manager.check_and_free_block_tables()
783784

784785
if not isinstance(tasks, list):

0 commit comments

Comments
 (0)