[Log] add log about gpu worker init snapshot and requested memory#29493
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
3f5e0cb to
b32a00c
Compare
There was a problem hiding this comment.
Code Review
This pull request adds two log lines to gpu_worker.py to provide details about memory initialization. My review focuses on improving the readability and conciseness of these logs to make them more effective for debugging, which is the stated purpose of the PR. I've suggested formatting the memory values in GiB, consistent with other logging in the file, instead of using the default repr.
vllm/v1/worker/gpu_worker.py
Outdated
| logger.info(f"worker init memory snapshot: {self.init_snapshot!r}") | ||
| logger.info(f"worker requested memory: {self.requested_memory}") |
There was a problem hiding this comment.
The new log messages for the memory snapshot and requested memory are very verbose due to the use of !r on a dataclass without a custom __repr__. This makes them hard to read and inconsistent with other memory-related logs in the file, which typically format memory sizes in GiB for better readability. To improve clarity and align with existing logging practices, it's better to format the output into a single, more concise log message, converting byte values to GiB.
GiB = lambda b: round(b / GiB_bytes, 2)
logger.info(
"Initial memory: free=%sGiB, total=%sGiB, requested=%sGiB.",
GiB(self.init_snapshot.free_memory),
GiB(self.init_snapshot.total_memory),
GiB(self.requested_memory),
)7882016 to
f5dacfa
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
400ffd7 to
f9adbcb
Compare
|
/cc @DarkLight1337 PTAL. |
a8aaa53 to
297274f
Compare
|
Hi @andyxning, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
5804122 to
425d9fd
Compare
|
Hi @andyxning, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
425d9fd to
b904ea6
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
Head branch was pushed to by a user without write access
46068a1 to
ae161bc
Compare
f68fd26 to
0efeffe
Compare
0efeffe to
42147d7
Compare
5dd6dbb to
2a3fbdc
Compare
4e17c36 to
feca434
Compare
|
Finally, ci is green. @DarkLight1337 PTAL. |
Signed-off-by: Andy Xie <andy.xning@gmail.com>
feca434 to
404aad6
Compare
…lm-project#29493) Signed-off-by: Andy Xie <andy.xning@gmail.com>
…lm-project#29493) Signed-off-by: Andy Xie <andy.xning@gmail.com>
…lm-project#29493) Signed-off-by: Andy Xie <andy.xning@gmail.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
…lm-project#29493) Signed-off-by: Andy Xie <andy.xning@gmail.com>
Purpose
Add detailed log about each gpu worker init snapshot and requested memory in favor of easily debug.
Test Plan
NA
Test Result
NA
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.