Skip to content

[RLlib] Cleanup default_resource_request.#50475

Merged
sven1977 merged 9 commits into
ray-project:masterfrom
sven1977:appo_accelerate_11_fix_multi_node_agg_actors
Feb 12, 2025
Merged

[RLlib] Cleanup default_resource_request.#50475
sven1977 merged 9 commits into
ray-project:masterfrom
sven1977:appo_accelerate_11_fix_multi_node_agg_actors

Conversation

@sven1977
Copy link
Copy Markdown
Contributor

@sven1977 sven1977 commented Feb 12, 2025

Cleanup default_resource_request.

Why are these changes needed?

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: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
…_accelerate_11_fix_multi_node_agg_actors
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 enabled auto-merge (squash) February 12, 2025 12:28
@github-actions github-actions Bot added the go add ONLY when ready to merge, run all tests label Feb 12, 2025
Copy link
Copy Markdown
Contributor

@simonsays1980 simonsays1980 left a comment

Choose a reason for hiding this comment

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

LGTM.

bundles = [driver] + rollout_bundles + evaluation_bundles + learner_bundles
learner_bundles = []
if config.enable_rl_module_and_learner:
learner_bundles = _get_learner_bundles(config)
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 using

if config.enable_rl_module_and_learner:
   learner_bundles = _get_learner_bundles(config)
else:
   learner_bundles = []

for better readability.

if worker_index == 0:
return self.env_runner_cls(**kwargs)

pg_bundle_idx = (
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.

Does this assignment per PG order always work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let's hope so :D
Yeah, it's indexing into the first n bundles, not counting the 0th bundle for the Trial (Algorithm main process/actor). These are always EnvRunner reserved. The second m bundles - if applicable - are then eval EnvRunners.

Signed-off-by: sven1977 <svenmika1977@gmail.com>
@github-actions github-actions Bot disabled auto-merge February 12, 2025 13:13
@sven1977 sven1977 enabled auto-merge (squash) February 12, 2025 13:20
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@github-actions github-actions Bot disabled auto-merge February 12, 2025 13:29
Signed-off-by: Sven Mika <svenmika1977@gmail.com>
@sven1977 sven1977 enabled auto-merge (squash) February 12, 2025 17:49
@github-actions github-actions Bot disabled auto-merge February 12, 2025 17:49
@sven1977 sven1977 enabled auto-merge (squash) February 12, 2025 17:54
@sven1977 sven1977 merged commit cc53a7a into ray-project:master Feb 12, 2025
@sven1977 sven1977 deleted the appo_accelerate_11_fix_multi_node_agg_actors branch February 13, 2025 12:55
xsuler pushed a commit to antgroup/ant-ray that referenced this pull request Mar 4, 2025
xsuler pushed a commit to antgroup/ant-ray that referenced this pull request Mar 4, 2025
park12sj pushed a commit to park12sj/ray that referenced this pull request Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-backlog go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants