-
Notifications
You must be signed in to change notification settings - Fork 467
Refector prepare_inputs in model_runner_v1.py #2750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refector prepare_inputs in model_runner_v1.py #2750
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request refactors the _prepare_inputs
method in model_runner_v1.py
to improve readability by extracting a helper function and using more idiomatic Python. The changes are generally good and achieve the stated goal. I have found one instance of redundant computation that can be removed to further improve the code's clarity and performance.
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (3.33%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2750 +/- ##
==========================================
- Coverage 72.99% 72.91% -0.09%
==========================================
Files 153 153
Lines 21331 21397 +66
==========================================
+ Hits 15571 15601 +30
- Misses 5760 5796 +36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: ChenTaoyu-SJTU <[email protected]>
7029cae
to
7ae539a
Compare
Signed-off-by: ChenTaoyu-SJTU <[email protected]>
### What this PR does / why we need it? Refector prepare_inputs in model_runner_v1.py for more easy read. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? PASS CI - vLLM version: v0.10.1.1 - vLLM main: vllm-project/vllm@e599e2c --------- Signed-off-by: ChenTaoyu-SJTU <[email protected]> Signed-off-by: 1Fire4 <[email protected]>
### What this PR does / why we need it? Refector prepare_inputs in model_runner_v1.py for more easy read. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? PASS CI - vLLM version: v0.10.1.1 - vLLM main: vllm-project/vllm@e599e2c --------- Signed-off-by: ChenTaoyu-SJTU <[email protected]> Signed-off-by: 1Fire4 <[email protected]>
### What this PR does / why we need it? Refector prepare_inputs in model_runner_v1.py for more easy read. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? PASS CI - vLLM version: v0.10.1.1 - vLLM main: vllm-project/vllm@e599e2c --------- Signed-off-by: ChenTaoyu-SJTU <[email protected]>
### What this PR does / why we need it? Refector prepare_inputs in model_runner_v1.py for more easy read. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? PASS CI - vLLM version: v0.10.1.1 - vLLM main: vllm-project/vllm@e599e2c --------- Signed-off-by: ChenTaoyu-SJTU <[email protected]> Signed-off-by: offline0806 <[email protected]>
### What this PR does / why we need it? Refector prepare_inputs in model_runner_v1.py for more easy read. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? PASS CI - vLLM version: v0.10.1.1 - vLLM main: vllm-project/vllm@e599e2c --------- Signed-off-by: ChenTaoyu-SJTU <[email protected]>
### What this PR does / why we need it? Refector prepare_inputs in model_runner_v1.py for more easy read. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? PASS CI - vLLM version: v0.10.1.1 - vLLM main: vllm-project/vllm@e599e2c --------- Signed-off-by: ChenTaoyu-SJTU <[email protected]>
What this PR does / why we need it?
Refector prepare_inputs in model_runner_v1.py for more easy read.
Does this PR introduce any user-facing change?
NO
How was this patch tested?
PASS CI