-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[train] reference custom resources in ScalingConfig.resources_per_worker #48708
Merged
matthewdeng
merged 3 commits into
ray-project:master
from
matthewdeng:scaling-config-custom
Dec 11, 2024
Merged
[train] reference custom resources in ScalingConfig.resources_per_worker #48708
matthewdeng
merged 3 commits into
ray-project:master
from
matthewdeng:scaling-config-custom
Dec 11, 2024
Conversation
This file contains 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
Signed-off-by: Matthew Deng <matt@anyscale.com>
Does it support memory without custom resources or only cpu and gpu? |
justinvyu
reviewed
Nov 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add custom resources to the example below:
from ray.train import ScalingConfig
scaling_config = ScalingConfig(
# Number of distributed workers.
num_workers=2,
# Turn on/off GPU.
use_gpu=True,
# Assign extra CPU/GPU/custom resources per worker.
resources_per_worker={"GPU": 1, "CPU": 1, "memory": 1e9, "custom": 1.0},
# Try to schedule workers on different nodes.
placement_strategy="SPREAD",
)
Also:
- Let's remove this
trainer_resources
section in the docs, or just keep the section talking about setting it to 0. https://docs.ray.io/en/latest/train/user-guides/using-gpus.html#trainer-resources - Link the scaling gpu resource configuration guide at the top of the
ScalingConfig
docstring. - Update the
resources_per_worker
section to not emphasize setting multiple GPUs. We already have another section about this, and it's not the recommended pattern.
…ig-custom Signed-off-by: Matthew Deng <matt@anyscale.com>
Signed-off-by: Matthew Deng <matt@anyscale.com>
hongpeng-guo
approved these changes
Dec 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
simonsays1980
pushed a commit
to simonsays1980/ray
that referenced
this pull request
Dec 12, 2024
…ker (ray-project#48708) Make it clear that you can specify Ray Core custom resources here. Signed-off-by: Matthew Deng <matt@anyscale.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Dec 17, 2024
…ker (ray-project#48708) Make it clear that you can specify Ray Core custom resources here. Signed-off-by: Matthew Deng <matt@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why are these changes needed?
Make it clear that you can specify Ray Core custom resources here.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.