Skip to content

Conversation

@cndoit18
Copy link
Contributor

@cndoit18 cndoit18 commented Aug 27, 2025

This change fixes an issue where enabling PYTHONOPTIMIZE would cause the task field to not be initialized properly, leading to crashes.

Purpose

Test Plan

Test Result


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.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

Copy link
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 correctly fixes a crash that occurs when PYTHONOPTIMIZE is enabled by moving a variable assignment out of an assert statement. This is a good fix for the immediate problem. My review includes a suggestion to further improve the code's robustness by replacing the assert statement with a standard conditional check. This ensures that input validation is always performed, even in optimized environments, which is a better practice for handling user-provided data.

@cndoit18 cndoit18 force-pushed the fix-pythonoptimize-task-field-init branch 3 times, most recently from a6a0f93 to 0d3b8da Compare August 27, 2025 07:33
@cndoit18 cndoit18 force-pushed the fix-pythonoptimize-task-field-init branch from 0d3b8da to f9be1d5 Compare August 27, 2025 09:18
This change fixes an issue where enabling PYTHONOPTIMIZE would cause
the task field to not be initialized properly, leading to crashes.

Signed-off-by: cndoit18 <cndoit18@outlook.com>
@cndoit18 cndoit18 force-pushed the fix-pythonoptimize-task-field-init branch from f9be1d5 to 7b8371d Compare August 27, 2025 09:44
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) August 27, 2025 09:52
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 27, 2025
@DarkLight1337 DarkLight1337 merged commit 8c13820 into vllm-project:main Aug 27, 2025
37 of 40 checks passed
@cndoit18 cndoit18 deleted the fix-pythonoptimize-task-field-init branch August 27, 2025 12:51
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
…vllm-project#23718)

Signed-off-by: cndoit18 <cndoit18@outlook.com>
Signed-off-by: Xiao Yu <xiao.yu@amd.com>
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Sep 3, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants