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

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

Merged
merged 1 commit into from
Mar 14, 2024

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 <[email protected]>
@@ -871,7 +871,7 @@ def step(self) -> ResultDict:
results = self._compile_iteration_results(
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
Collaborator

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?

@@ -183,6 +183,13 @@ def _save_module_metadata(self, *args, **kwargs):
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
Collaborator

@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

@@ -871,7 +871,7 @@ def step(self) -> ResultDict:
results = self._compile_iteration_results(
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
Collaborator

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
Collaborator

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
9 checks passed
khluu pushed a commit that referenced this pull request Mar 14, 2024
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