Skip to content
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

[Data][Train] Allow manually setting resource limits for training jobs #45188

Merged
merged 4 commits into from
May 9, 2024

Conversation

raulchen
Copy link
Contributor

@raulchen raulchen commented May 7, 2024

Why are these changes needed?

Previously it's not possible to manually set data resource limits for training jobs.
Because we automatically set "exclude_resources" for training jobs, and "exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting "exclude_resources" when "resource_limits" are already set by the user

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Copy link
Member

@woshiyyya woshiyyya left a comment

Choose a reason for hiding this comment

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

Thanks Hao!

Two questions here:

  • currently it seems only support excluding num_gpu and num_cpu, how could we ensure that those excluded gpus and cpus are colocated? (instead of excluding x cpu per node)
  • Is it a good idea to provide a flag for the train users to exclude all resources of the training nodes?

@raulchen
Copy link
Contributor Author

raulchen commented May 9, 2024

currently it seems only support excluding num_gpu and num_cpu, how could we ensure that those excluded gpus and cpus are colocated? (instead of excluding x cpu per node)

Data scheduler doesn't distinguish the resources by nodes right now. It only looks at the global resource usage.

Is it a good idea to provide a flag for the train users to exclude all resources of the training nodes?

This is a good idea, I found it useful as well. But to do that, we also need to config training worker resource to take all resources from the training nodes. Otherwise, data tasks will still be scheduled on the training nodes. we can discuss more later.

@raulchen raulchen merged commit 4f12c15 into ray-project:master May 9, 2024
5 checks passed
@raulchen raulchen deleted the train-manual-resource-limits branch May 9, 2024 17:35
liuxsh9 pushed a commit to liuxsh9/ray that referenced this pull request May 10, 2024
ray-project#45188)

Previously it's not possible to manually set data resource limits for
training jobs.
Because we automatically set "exclude_resources" for training jobs, and
"exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting
"exclude_resources" when "resource_limits" are already set by the user

---------

Signed-off-by: Hao Chen <chenh1024@gmail.com>
HenryZJY pushed a commit to HenryZJY/ray that referenced this pull request May 10, 2024
ray-project#45188)

Previously it's not possible to manually set data resource limits for
training jobs.
Because we automatically set "exclude_resources" for training jobs, and
"exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting
"exclude_resources" when "resource_limits" are already set by the user

---------

Signed-off-by: Hao Chen <chenh1024@gmail.com>
peytondmurray pushed a commit to peytondmurray/ray that referenced this pull request May 13, 2024
ray-project#45188)

Previously it's not possible to manually set data resource limits for
training jobs.
Because we automatically set "exclude_resources" for training jobs, and
"exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting
"exclude_resources" when "resource_limits" are already set by the user

---------

Signed-off-by: Hao Chen <chenh1024@gmail.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
ray-project#45188)

Previously it's not possible to manually set data resource limits for
training jobs.
Because we automatically set "exclude_resources" for training jobs, and
"exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting
"exclude_resources" when "resource_limits" are already set by the user

---------

Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
ray-project#45188)

Previously it's not possible to manually set data resource limits for
training jobs.
Because we automatically set "exclude_resources" for training jobs, and
"exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting
"exclude_resources" when "resource_limits" are already set by the user

---------

Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 7, 2024
ray-project#45188)

Previously it's not possible to manually set data resource limits for
training jobs.
Because we automatically set "exclude_resources" for training jobs, and
"exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting
"exclude_resources" when "resource_limits" are already set by the user

---------

Signed-off-by: Hao Chen <chenh1024@gmail.com>
GabeChurch pushed a commit to GabeChurch/ray that referenced this pull request Jun 11, 2024
ray-project#45188)

Previously it's not possible to manually set data resource limits for
training jobs.
Because we automatically set "exclude_resources" for training jobs, and
"exclude_resources" and "resource_limits" cannot be both set.

This PR fixes this issue by not automatically setting
"exclude_resources" when "resource_limits" are already set by the user

---------

Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: gchurch <gabe1church@gmail.com>
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.

None yet

4 participants