Skip to content

[RLlib] 2 fixes for 2.10 release: 1) DDP + GPU fix; 2) py3.8 fix for uniting two dicts#44000

Merged
sven1977 merged 1 commit intoray-project:masterfrom
sven1977:emergency_fixes_release_2_10
Mar 14, 2024
Merged

[RLlib] 2 fixes for 2.10 release: 1) DDP + GPU fix; 2) py3.8 fix for uniting two dicts#44000
sven1977 merged 1 commit intoray-project:masterfrom
sven1977:emergency_fixes_release_2_10

Conversation

@sven1977
Copy link
Contributor

2 fixes for 2.10 release: 1) DDP + GPU fix; 2) py3.8 fix for uniting two dicts

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>
episodes_this_iter=episodes_this_iter,
step_ctx=train_iter_ctx,
iteration_results=train_results | eval_results,
iteration_results={**train_results, **eval_results},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

py3.8 does not support dict | dict.

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't py3.8 deprecated by the next Ray release version?

def _module_metadata(self, *args, **kwargs):
return self.unwrapped()._module_metadata(*args, **kwargs)

# TODO (sven): Figure out a better way to avoid having to method-spam this wrapper
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to find a better solution for this, but this fixes PPO + multi-GPU on the new stack for now.

Copy link
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

episodes_this_iter=episodes_this_iter,
step_ctx=train_iter_ctx,
iteration_results=train_results | eval_results,
iteration_results={**train_results, **eval_results},
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't py3.8 deprecated by the next Ray release version?

# class, whenever we add a new API to any wrapped RLModule here. We could try
# auto generating the wrapper methods, but this will bring its own challenge
# (e.g. recursive calls due to __getattr__ checks, etc..).
def _compute_values(self, *args, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

Btw: Can't we also compile this method?

@sven1977 sven1977 merged commit 8cefa97 into ray-project:master Mar 14, 2024
khluu pushed a commit that referenced this pull request Mar 14, 2024


Cherry pick #44000

Signed-off-by: sven1977 <svenmika1977@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.

2 participants