Skip to content

Conversation

@Daraan
Copy link
Contributor

@Daraan Daraan commented Nov 1, 2025

The current examples describe that label bundles are written as:

[{"ray.io/accelerator-type": "H100"}* 2], i.e. a dict * integer.
This is wrong it has to be the list that is multiplied.
This PR fixes this.

Signed-off-by: Daraan <github.blurry@9ox.net>
@Daraan Daraan requested review from a team as code owners November 1, 2025 14:02
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 invalid Python syntax in the documentation examples for bundle_label_selector and bundles within ray.util.placement_group. The original examples incorrectly attempted to multiply a dictionary by an integer, which would raise a TypeError. The provided fix changes this to multiply a list containing the dictionary, which is the correct idiom for creating a list with repeated elements. The changes are accurate and make the documentation examples correct and runnable.

@ray-gardener ray-gardener bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Nov 1, 2025
@jjyao jjyao added the go add ONLY when ready to merge, run all tests label Nov 1, 2025
Copy link
Collaborator

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

Thanks @Daraan!

@edoakes edoakes enabled auto-merge (squash) November 1, 2025 20:29
@edoakes edoakes merged commit 10573a6 into ray-project:master Nov 1, 2025
7 checks passed
YoussefEssDS pushed a commit to YoussefEssDS/ray that referenced this pull request Nov 8, 2025
The current examples describe that label bundles are written as:

`[{"ray.io/accelerator-type": "H100"}* 2]`, i.e. a dict * integer.
This is wrong it has to be the list that is multiplied.
This PR fixes this.

Signed-off-by: Daraan <github.blurry@9ox.net>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
The current examples describe that label bundles are written as:

`[{"ray.io/accelerator-type": "H100"}* 2]`, i.e. a dict * integer.
This is wrong it has to be the list that is multiplied.
This PR fixes this.

Signed-off-by: Daraan <github.blurry@9ox.net>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
The current examples describe that label bundles are written as:

`[{"ray.io/accelerator-type": "H100"}* 2]`, i.e. a dict * integer.
This is wrong it has to be the list that is multiplied.
This PR fixes this.

Signed-off-by: Daraan <github.blurry@9ox.net>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
The current examples describe that label bundles are written as:

`[{"ray.io/accelerator-type": "H100"}* 2]`, i.e. a dict * integer.
This is wrong it has to be the list that is multiplied.
This PR fixes this.

Signed-off-by: Daraan <github.blurry@9ox.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants