Repository navigation
Multi-node multi-instance vLLM via gym eval submit #2597
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
Merged
Merged
Changes from all commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
4d88403
feat(orchestration): gym eval submit command
prokotg 8f7ed77
move as much orchestration to a separate module
prokotg 748fd41
base class for service type
prokotg 864a876
mark experimental
prokotg 356881c
validate placements
prokotg 743ce41
only single compute with tests
prokotg b243b9e
builder draft; update services
prokotg 7e72d6f
make ComputeConfig a desscriminated union
prokotg 6525533
connect to the host; replace gym env wait placeholder with a simple curl
prokotg 4c56c88
make SlurmExecutor explicitly pyxis based
prokotg f1d9683
timestamp rundir and redirect logs
prokotg a247be9
str-format sbatch script
prokotg a7914f8
introduce a dry-run and improve socket handling
prokotg 8f63fbe
add account to slurm config; prefix remote dir
prokotg d5c9b8a
get submit confirmation
prokotg ad69cd6
slurm-native log handling; default container for the driver
prokotg 473a78f
add health check validation
prokotg ec63660
gym eval run parameter passing yaml > CLI
prokotg 5e818bd
move argument passing out of SlurmExecutor
prokotg 0ae8867
separate templating
prokotg be265f3
PolicyModel config and synthactic sugar for wiring policy model with …
prokotg cf8ae94
allow to install on the fly; do not allow extra across api
prokotg 3d7fba1
switch from list to dict for benchmarks; overlap and no container mou…
prokotg e4f1435
add preparation stage as well
prokotg a1f681e
fix hydra force-override
prokotg 4d79207
add a dummy policy_api_key; change to local copy because we cannot re…
prokotg 8c27a4c
add some more tests
prokotg 427346e
Add in-code doc comments
prokotg 9308727
smarter entrypoint
prokotg c7487e9
cleanup tempdirs
prokotg eef3f1f
Merge branch 'main' into tgrzegorzek/orchestration
prokotg 3d0a1ef
make CI happy
prokotg 8ec6fac
add missing spdx headers
prokotg 2daaa18
linting
prokotg be3a1a0
fix ignored health path
prokotg 2e263ea
ignore dummy api key
prokotg dd335c3
linting
prokotg 4afa47b
add exemplary config for orchestration
prokotg 4391efb
Add env variable injection support
oyilmaz-nvidia ae0ed71
Resolve merge conflicts
oyilmaz-nvidia b445576
Fix merge conflicts
oyilmaz-nvidia b3aba0c
Fix merge conflicts
oyilmaz-nvidia 1479b60
Fix pre-commit formatting and lint issues in test_slurm_script.py
oyilmaz-nvidia 4f14562
Merge branch 'main' into onur/orchestration-env-var-injection
oyilmaz-nvidia 2d58049
Fix security related issues
oyilmaz-nvidia 9aa6bbc
Add output and mount support
oyilmaz-nvidia 39fb54f
Addressing the reviews
oyilmaz-nvidia c688eb3
Fix CI secret issue
oyilmaz-nvidia 1a01216
Merge branch 'main' into onur/orchestration-env-var-injection
oyilmaz-nvidia e1ced0d
Fix test issue
oyilmaz-nvidia 8d302aa
Merge branch 'onur/orchestration-env-var-injection' into onur/orchest…
oyilmaz-nvidia 6f75874
Revert output file changes
oyilmaz-nvidia c2f6dc9
Check the mounts exist or not
oyilmaz-nvidia e8993d4
Merge branch 'main' into onur/orchestration-env-var-injection
oyilmaz-nvidia d594a00
Merge branch 'main' into onur/orchestration-env-var-injection
oyilmaz-nvidia 7e03566
Merge branch 'onur/orchestration-env-var-injection' into onur/orchest…
oyilmaz-nvidia a0a5525
Add assertions
oyilmaz-nvidia 1bdf41f
Fix linting issues
oyilmaz-nvidia 62a6d41
Adding multi instance support using vllm serivce
oyilmaz-nvidia b2245c8
Merge branch 'main' into onur/orchestration-art-output
oyilmaz-nvidia 7737d22
Merge branch 'onur/orchestration-art-output' into onur/multi-instance…
oyilmaz-nvidia 56d84fc
Merge branch 'main' into onur/multi-instance-vllm-service
oyilmaz-nvidia 2526208
Merge branch 'onur/multi-instance-vllm-service' of github.com:NVIDIA-…
oyilmaz-nvidia 641efc2
Adding multi node srun support
oyilmaz-nvidia 69f4780
Merge branch 'main' into onur/multi-instance-vllm-service
oyilmaz-nvidia 3c968b5
Merge branch 'main' into onur/multi-instance-vllm-service
oyilmaz-nvidia 83577b5
Add ray based multi node
oyilmaz-nvidia 81a2663
Support old ray command
oyilmaz-nvidia 70a9089
Fix the deployment issue
oyilmaz-nvidia 878001b
Fix the issue
oyilmaz-nvidia 73e5cbb
Add DP support
oyilmaz-nvidia 0c426c8
Merge branch 'main' into onur/multi-instance-vllm-service
oyilmaz-nvidia 5d5a327
Add number of GPUs check
oyilmaz-nvidia 32edfef
Merge branch 'main' into onur/multi-instance-vllm-service
oyilmaz-nvidia 75bdc09
Fix merge conflicts
oyilmaz-nvidia 5b5dddf
Remove the multi node pieces from this PR
oyilmaz-nvidia ca9a8b5
merge main
oyilmaz-nvidia d82c18d
Remove the vllm_service type
oyilmaz-nvidia cc801f1
Merge branch 'main' into onur/multi-instance-vllm-service
oyilmaz-nvidia 25f6e2f
Untrack ray_serve multi-node scratch example
oyilmaz-nvidia 06c6b4f
Untrack remaining onur scratch examples
oyilmaz-nvidia 3f6cf68
Fix merge conflicts
oyilmaz-nvidia a76b461
Remove the distributed param
oyilmaz-nvidia 098c42c
Untrack onur scratch examples
oyilmaz-nvidia 0cdda1b
Add GPU number check
oyilmaz-nvidia a03455d
Fix merge conflicts
oyilmaz-nvidia d1ccb00
Address PR reviews
oyilmaz-nvidia b772583
Merge branch 'main' into onur/ray-service-multi-gpu
oyilmaz-nvidia 764d8e8
Merge branch 'main' into onur/ray-service-multi-gpu
oyilmaz-nvidia 8d8ed3e
Merge branch 'main' into onur/ray-service-multi-gpu
oyilmaz-nvidia 968b57c
Merge branch 'main' into onur/ray-service-multi-gpu
oyilmaz-nvidia 3b5da65
Merge branch 'main' into onur/ray-service-multi-gpu
oyilmaz-nvidia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| compute: | ||
| cluster: | ||
| type: slurm | ||
| hostname: myslurmcluster | ||
| walltime: "01:00:00" | ||
| account: myaccount | ||
| node_pools: | ||
| compute: | ||
| partition: batch | ||
| nodes: 2 | ||
| ntasks_per_node: 1 | ||
| gpus_per_node: 8 | ||
|
|
||
| services: | ||
| vllm_model: | ||
| container: vllm/vllm-openai:v0.9.0 | ||
| type: vllm | ||
| model: Qwen/Qwen2.5-72B-Instruct | ||
| trust_remote_code: true | ||
| tensor_parallel_size: 2 # 8 instances x TP2 = 16 GPUs total, spans both nodes (2 x 8 GPUs) | ||
| number_of_instances: 8 # footprint exceeds one node, so the ray backend is used automatically | ||
| port: 8000 | ||
| health_check: | ||
| timeout_seconds: 1200 | ||
| mounts: | ||
| - /lustre/datasets:/data | ||
|
|
||
| driver: | ||
| policy_model: vllm_model | ||
| container: python:3.13 | ||
| gym_install: | ||
| ref: main | ||
| benchmarks: | ||
| gpqa: | ||
| run: | ||
| split: benchmark | ||
| config_paths: | ||
| - benchmarks/gpqa/config.yaml | ||
|
|
||
| job: | ||
| output_path: /lustre/fsw/my-path | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,35 @@ | |
| import shlex | ||
|
|
||
|
|
||
| _RAY_PRELUDE = """\ | ||
| # Resolve the head node IP for multi-node vLLM services (spanning nodes via Ray). | ||
| nodes=$(scontrol show hostnames "$SLURM_JOB_NODELIST") | ||
| nodes_array=($nodes) | ||
| head_node_hostname=${nodes_array[0]} | ||
| head_node_ip=$(getent hosts "$head_node_hostname" | awk '{print $1}') | ||
| export HEAD_NODE_IP="$head_node_ip" | ||
| export RAY_HEAD_NODE_IP="$head_node_ip:6379" | ||
| echo "Head node IP address: $HEAD_NODE_IP\"""" | ||
|
|
||
|
|
||
| _VLLM_RAY_SYMMETRIC_RUN = """\ | ||
| bash -lc ' | ||
| command -v ray >/dev/null 2>&1 || pip install -q "ray[default]" | ||
| if ray symmetric-run --help >/dev/null 2>&1; then | ||
| ray symmetric-run \\ | ||
| --address "$RAY_HEAD_NODE_IP" \\ | ||
| --min-nodes {total_nodes} \\ | ||
| {resource_flags} \\ | ||
| -- {inner_cmd} | ||
| elif [ "$SLURM_NODEID" = "0" ]; then | ||
| ray start --head --port=6379 {resource_flags} | ||
| {inner_cmd} | ||
| else | ||
| ray start --address="$RAY_HEAD_NODE_IP" {resource_flags} --block | ||
| fi | ||
| '""" | ||
|
|
||
|
|
||
| _HEALTH_WAIT_MULTI = """\ | ||
| # Wait for {name} (try multiple health endpoints) | ||
| echo "Waiting for {name} at {url}..." | ||
|
|
@@ -44,6 +73,22 @@ def bash_var(name: str) -> str: | |
| return re.sub(r"[^A-Z0-9]", "_", name.upper()) | ||
|
|
||
|
|
||
| def render_ray_prelude() -> str: | ||
| return _RAY_PRELUDE | ||
|
Comment on lines
+76
to
+77
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this function can be removed |
||
|
|
||
|
|
||
| def render_vllm_ray_symmetric_run(inner_cmd: str, total_nodes: int, resource_flags: str) -> str: | ||
| """Render the Ray head/worker bootstrap that wraps a single vLLM instance's TP/PP command so | ||
| it spans multiple Slurm nodes. | ||
|
|
||
| Uses `ray symmetric-run` when available (Ray >= 2.50), which starts/joins a Ray cluster across | ||
| every task and runs the entrypoint only on the elected head node. Containers with an older Ray | ||
| pin fall back to manually starting head/worker Ray processes, keyed on Slurm's per-node task | ||
| rank ($SLURM_NODEID). | ||
| """ | ||
| return _VLLM_RAY_SYMMETRIC_RUN.format(total_nodes=total_nodes, resource_flags=resource_flags, inner_cmd=inner_cmd) | ||
|
|
||
|
|
||
| def render_health_check(name: str, port: int, path: str, timeout: int) -> str: | ||
| return _HEALTH_WAIT_MULTI.format( | ||
| name=name, | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.