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] Slate-Q +GPU torch bug fix. #23464

Merged
merged 4 commits into from
Mar 24, 2022

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Mar 24, 2022

Slate-Q +GPU torch bug fix.

  • observations and next-observations were not properly auto-copied to GPU by the SampleBatch's get_interceptor. This is probably due to the nested dict structure (preprocessor off for SlateQ) arriving in the loss function

Why are these changes needed?

Related issue number

Checks

  • 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 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 :(

Copy link
Contributor

@avnishn avnishn left a comment

Choose a reason for hiding this comment

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

Looks fine to me. Did you get a chance to run it on prod?

@sven1977
Copy link
Contributor Author

Yes, this was tested on a GPU machine in the product.

@sven1977 sven1977 merged commit 22c9c4a into ray-project:master Mar 24, 2022
# action.shape: [B, S]
actions = train_batch[SampleBatch.ACTIONS]

observation = convert_to_torch_tensor(
Copy link
Member

Choose a reason for hiding this comment

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

just a thought, should we fix this in a more generic way for dict obs space?
not sure if this is also happening to other agents, and they just don't use strange looking obs by default.

@@ -487,7 +487,7 @@ slateq-interest-evolution-recsim-env:
convert_to_discrete_action_space: false
seed: 0

Copy link
Member

Choose a reason for hiding this comment

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

framework was changed from torch to tf.
do you want to change it back? or run both?

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

3 participants