Skip to content

[Log] add log about gpu worker init snapshot and requested memory#29493

Merged
DarkLight1337 merged 1 commit intovllm-project:mainfrom
andyxning:add_log_about_gpu_worker_init_snapshot_and_requested_memory
Jan 6, 2026
Merged

[Log] add log about gpu worker init snapshot and requested memory#29493
DarkLight1337 merged 1 commit intovllm-project:mainfrom
andyxning:add_log_about_gpu_worker_init_snapshot_and_requested_memory

Conversation

@andyxning
Copy link
Copy Markdown
Contributor

@andyxning andyxning commented Nov 26, 2025

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
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from 3f5e0cb to b32a00c Compare November 26, 2025 11:27
@mergify mergify bot added the v1 label Nov 26, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 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.

Comment on lines +226 to +227
logger.info(f"worker init memory snapshot: {self.init_snapshot!r}")
logger.info(f"worker requested memory: {self.requested_memory}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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),
            )

@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch 4 times, most recently from 7882016 to f5dacfa Compare November 26, 2025 13:08
@mergify
Copy link
Copy Markdown

mergify bot commented Dec 18, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @andyxning.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Dec 18, 2025
@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from 400ffd7 to f9adbcb Compare January 3, 2026 12:48
@mergify mergify bot removed the needs-rebase label Jan 3, 2026
@chaunceyjiang
Copy link
Copy Markdown
Collaborator

/cc @DarkLight1337 PTAL.

@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from a8aaa53 to 297274f Compare January 4, 2026 10:15
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 4, 2026

Hi @andyxning, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch 2 times, most recently from 5804122 to 425d9fd Compare January 4, 2026 11:37
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 4, 2026

Hi @andyxning, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from 425d9fd to b904ea6 Compare January 4, 2026 11:58
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) January 4, 2026 13:18
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 4, 2026
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 5, 2026

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @andyxning.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Jan 5, 2026
auto-merge was automatically disabled January 5, 2026 02:49

Head branch was pushed to by a user without write access

@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from 46068a1 to ae161bc Compare January 5, 2026 02:49
@mergify mergify bot removed the needs-rebase label Jan 5, 2026
@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch 2 times, most recently from f68fd26 to 0efeffe Compare January 6, 2026 00:25
@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from 0efeffe to 42147d7 Compare January 6, 2026 02:56
@mergify mergify bot added the ci/build label Jan 6, 2026
@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch 4 times, most recently from 5dd6dbb to 2a3fbdc Compare January 6, 2026 08:42
@andyxning andyxning mentioned this pull request Jan 6, 2026
5 tasks
@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from 4e17c36 to feca434 Compare January 6, 2026 12:22
@andyxning
Copy link
Copy Markdown
Contributor Author

Finally, ci is green. @DarkLight1337 PTAL.

Signed-off-by: Andy Xie <andy.xning@gmail.com>
@andyxning andyxning force-pushed the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch from feca434 to 404aad6 Compare January 6, 2026 15:43
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) January 6, 2026 15:58
@DarkLight1337 DarkLight1337 merged commit 6f5e653 into vllm-project:main Jan 6, 2026
48 checks passed
@andyxning andyxning deleted the add_log_about_gpu_worker_init_snapshot_and_requested_memory branch January 7, 2026 02:11
yugong333 pushed a commit to yugong333/vllm that referenced this pull request Jan 9, 2026
akh64bit pushed a commit to akh64bit/vllm that referenced this pull request Jan 16, 2026
dsuhinin pushed a commit to dsuhinin/vllm that referenced this pull request Jan 21, 2026
…lm-project#29493)

Signed-off-by: Andy Xie <andy.xning@gmail.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants