[Bug]: Is the logic order correct during the scheduler procedure?
Your current environment
The output of `python collect_env.py`
none
🐛 Describe the bug
Hi @WoosukKwon, is the order of these two lines of code correct? Why is self.append(request) called before updating the request attribute in the update section during the scheduling?
def schedule(self) -> SchedulerOutput:
......
self.running.append(request)
.....
.....
request.num_computed_tokens = num_computed_tokens
https://github.com/vllm-project/vllm/blame/0e237f00357c968a4f7ae25accd533e924baceff/vllm/v1/core/sched/scheduler.py#L384 https://github.com/vllm-project/vllm/blame/0e237f00357c968a4f7ae25accd533e924baceff/vllm/v1/core/sched/scheduler.py#L405C3-L405C3
Before submitting a new issue...
- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
When creating scheduler_output, there must be RequestData that reflects the num_computed_tokens of the scheduled request.
So after creating scheduler_output, update request.num_computed_tokens for the next scheduling.
This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!
This issue has been automatically closed due to inactivity. Please feel free to reopen if you feel it is still relevant. Thank you!