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] Add support for complex observations in CQL #23332

Merged
merged 5 commits into from
Mar 22, 2022
Merged

[RLlib] Add support for complex observations in CQL #23332

merged 5 commits into from
Mar 22, 2022

Conversation

fwitter
Copy link
Contributor

@fwitter fwitter commented Mar 18, 2022

Why are these changes needed?

When training CQL with complex observations, i.e. structures consisting of gym.spaces.Dict or gym.spaces.Tuple, CQLTrainer throws an error during loss computation. This PR resolves the problem.

Related issue number

Closes #23331

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
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

any chance you can help update the torch policy as well?
thanks.

rllib/agents/cql/cql_torch_policy.py Outdated Show resolved Hide resolved
rllib/agents/cql/cql_tf_policy.py Show resolved Hide resolved
@fwitter
Copy link
Contributor Author

fwitter commented Mar 19, 2022

any chance you can help update the torch policy as well? thanks.

Already included :)

Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.
@sven1977, can you help merge?

@avnishn
Copy link
Contributor

avnishn commented Mar 22, 2022

how have you been checking to see that this works @fwitter ?

could we add a small test to test_cql.py?

@sven1977 sven1977 changed the title Add support for complex observations in CQL [RLlib] Add support for complex observations in CQL Mar 22, 2022
@sven1977 sven1977 merged commit 2547055 into ray-project:master Mar 22, 2022
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.

[Bug] [RLlib] CQL does not support complex observations
4 participants