Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/v1/worker/test_spyre_input_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ def _remove_requests(input_batch: SamplingInputBatch, batch_size: int,
for index in req_indices_to_remove:
input_batch.remove_request(reqs[index].req_id)
req_ids_to_remove.add(reqs[index].req_id)

# FIXME: it is a bug in the current implementation that removed indices may
# be duplicated, which can break logitsprocs tracking. Once fixed we should
# add this assert.
# see also: https://github.com/vllm-project/vllm-spyre/issues/508
# removed = input_batch.batch_update_builder.removed
# assert len(set(removed)) == len(removed), "Duplicate removed indices"

return req_ids_to_remove


Expand Down
5 changes: 4 additions & 1 deletion vllm_spyre/v1/worker/spyre_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,10 @@ def update_states(self, scheduler_output: SchedulerOutput):
for req_id in scheduler_output.finished_req_ids:
self.input_batch.remove_request(req_id)
self.requests.pop(req_id, None)
self.input_batch.refresh_metadata()
# TODO: Processing multiple removals at once can break alignment
# of logitprocs. Refactor so that we can batch removals to the
# `input_batch`
self.input_batch.refresh_metadata()

def _get_prompt_logprobs_dict(
self,
Expand Down