Skip to content

Conversation

ruisearch42
Copy link
Collaborator

@ruisearch42 ruisearch42 commented Jul 31, 2025

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.

Purpose

Currently vLLM does not pass down Ray runtime_env to the workers. This PR fixes it.

Fixes ray-project/ray#54866

Co-authored with @eric-higgins-ai from #21143

Test Plan

Added new unit test.

Manual test of #54866
Verified flashinfer dep is passed down and taking effect:

(ServeReplica:llm_app:LLMDeploymentQwen3-30B-A3B pid=310546) (RayWorkerWrapper pid=312171) INFO 07-31 15:14:03 [topk_topp_sampler.py:49] Using FlashInfer for top-p & top-k sampling.

Test Result

Passed

(Optional) Documentation Update

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 can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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.

🚀

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 introduces a mechanism to capture the Ray runtime_env when creating an engine configuration. This is a valuable feature for distributed deployments on Ray. The implementation correctly captures the runtime_env and stores it in the ParallelConfig. However, my review found a critical issue where this captured runtime_env is not actually used to configure the Ray workers, making the feature incomplete. The workers' runtime environment will not be affected by this change as it stands.

@ruisearch42 ruisearch42 force-pushed the rt_env branch 2 times, most recently from 4502c08 to 20f243d Compare July 31, 2025 22:36
Signed-off-by: Rui Qiao <[email protected]>
@ruisearch42 ruisearch42 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 1, 2025
Signed-off-by: Rui Qiao <[email protected]>
@simon-mo simon-mo enabled auto-merge (squash) August 1, 2025 17:11
@vllm-bot vllm-bot merged commit 4ac8437 into vllm-project:main Aug 2, 2025
68 of 71 checks passed
npanpaliya pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Aug 6, 2025
jinzhen-lin pushed a commit to jinzhen-lin/vllm that referenced this pull request Aug 9, 2025
noamgat pushed a commit to noamgat/vllm that referenced this pull request Aug 9, 2025
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
# as opposed to is_in_ray_actor().
import ray
ray_runtime_env = ray.get_runtime_context().runtime_env
logger.info("Using ray runtime env: %s", ray_runtime_env)
Copy link

Choose a reason for hiding this comment

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

Please don't print things like envs to logs, they often can contain secrets.

Copy link
Collaborator Author

@ruisearch42 ruisearch42 Oct 6, 2025

Choose a reason for hiding this comment

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

Thanks, make sense. I created a PR to address this. #26302

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.

Issue installing additional dependencies using runtime_env
4 participants