Skip to content

Commit 6735626

Browse files
authored
fix request_output sampling_params (#3154) (#3464)
1 parent bca8905 commit 6735626

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
@@ -734,10 +734,6 @@ def insert_tasks(self, tasks, current_id=-1, allocated=False):
734734
"""
735735
Insert tasks to engine.
736736
"""
737-
for task in tasks:
738-
start_span_request("DEQUEUE", task, trace.SpanKind.CONSUMER)
739-
if task.sampling_params.bad_words is not None:
740-
task.sampling_params.update_from_tokenizer(self.data_processor.tokenizer)
741737
# TODO 返回至 scheduler
742738
if allocated:
743739
current_tasks = []
@@ -764,6 +760,11 @@ def insert_tasks(self, tasks, current_id=-1, allocated=False):
764760
self.engine_worker_queue.put_tasks((current_tasks, self.resource_manager.real_bsz))
765761
return True
766762

763+
for task in tasks:
764+
start_span_request("DEQUEUE", task, trace.SpanKind.CONSUMER)
765+
if task.sampling_params.bad_words is not None:
766+
task.sampling_params.update_from_tokenizer(self.data_processor.tokenizer)
767+
767768
self.resource_manager.check_and_free_block_tables()
768769

769770
if not isinstance(tasks, list):

0 commit comments

Comments
 (0)