Skip to content

Document heterogeneous node groups for tasks - #4154

Merged
Bihan merged 3 commits into
dstackai:masterfrom
Bihan:pr_docs_hetero_node_groups
Aug 18, 2026
Merged

Document heterogeneous node groups for tasks#4154
Bihan merged 3 commits into
dstackai:masterfrom
Bihan:pr_docs_hetero_node_groups

Conversation

@Bihan

@Bihan Bihan commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a Node groups section to the tasks concepts docs covering per-group nodes/resources/commands/ports and ${{ groups[i].nodes[j].IP_ADDRESS }} references.
  • Split from the feature work in Support Heterogenous Node Groups #4094 so docs can be reviewed separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Bihan
Bihan requested a review from peterschmidt85 August 17, 2026 11:47

@peterschmidt85 peterschmidt85 left a comment

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.

  1. Do you think we could also add "???" (collapsible) section with P/D example?
  2. Do you think it would make sense to also re-write our mpirun and ray examples - and link them from here?

Comment thread mkdocs/docs/concepts/tasks.md Outdated
`${{ groups[i].nodes[j].IP_ADDRESS }}`, where `i` is the index of the group in `groups` and `j` is
the index of the node within that group.

Node `groups[0].nodes[0]` is the run's master node — it is what `DSTACK_MASTER_NODE_IP` resolves

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.

IMO, this can use a blockquote to highlight this?

@Bihan

Bihan commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

@peterschmidt85

  1. Do you think we could also add "???" (collapsible) section with P/D example?

P/D is a service setup, and the next PR switches services from replicas: to groups: and adds interpolation. I think it would be better to add it once that PR lands, when the example can use groups: and ${{ groups[i].replicas[j].IP_ADDRESS }}.

  1. Do you think it would make sense to also re-write our mpirun and ray examples - and link them from here?
    Yes.

@peterschmidt85

Copy link
Copy Markdown
Contributor

@Bihan

P/D is a service setup

I meant adding a task example

@Bihan
Bihan requested a review from peterschmidt85 August 18, 2026 09:38
Comment thread mkdocs/docs/concepts/tasks.md Outdated
the index of the node within that group.

> Node `groups[0].nodes[0]` is the run's master node — it is what `DSTACK_MASTER_NODE_IP` resolves
> to, and `startup_order` and `stop_criteria` apply to it across all groups.

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.

and startup_order and stop_criteria apply to it across all groups.

is't it a bit vague? what exactly is the point we want to make?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. Groups don't change startup_order / stop_criteria behavior. The master is still job_num 0 — so I've removed that line.

cpu: 4

- name: prefill
nodes: 1

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.

is 1 a representative example? just want to confirm
same question for prefill group

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think yes for a Node groups example.

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.

But it may mislead, for master its most often 1 but for workers most often not

fi

groups:
- name: master # node group name is optional

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.

Maybe node group name is optional -> The name property is optional
?

# Run RCCL tests via MPI
- |
mpirun --allow-run-as-root \
--hostfile $DSTACK_MPI_HOSTFILE \

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.

Just a question, do we explain anywhere what DSTACK_MPI_HOSTFILE means in the context of node groups?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have added below line

The file lists GPU nodes as <ip> slots=<gpus> and CPU nodes as <ip>.

in https://dstack.ai/docs/reference/env/#dstackyml

Comment thread mkdocs/docs/examples/training/miles.md Outdated
disk: 1000GB..

groups:
- name: head # node group name is optional

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.

Maybe node group name is optional -> The name property is optional
?

@peterschmidt85 peterschmidt85 left a comment

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.

Left few minor comments

@Bihan
Bihan merged commit 9804a7c into dstackai:master Aug 18, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants