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] Better error message for partial space mismatch (Dict|Tuple) between env-returned values and given action/obs space. #27785

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Aug 11, 2022

Signed-off-by: sven1977 [email protected]

Create a better error message for when parts of the observations/actions (Dict or Tuple space) do not match the actual space.
Right now, the user is left with a cryptic printout of a very large dict of numpy arrays that supposedly do not match a very large and complex Dict/Tuple space.
The PR adds the exact key/index-path, the single offending value and sub-space, as well as the dtypes to the error message, such that finding the problem becomes much easier.

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 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]>
@sven1977 sven1977 changed the title wip [RLlib] Better error message for partial space mismatch (Dict|Tuple) between env-returned values and given action/obs space. Aug 11, 2022
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
@sven1977 sven1977 added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Sep 9, 2022
Copy link
Contributor

@ArturNiederfahrenhorst ArturNiederfahrenhorst left a comment

Choose a reason for hiding this comment

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

lgtm!

@ArturNiederfahrenhorst ArturNiederfahrenhorst added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Sep 20, 2022
@sven1977 sven1977 merged commit 3c36e6d into ray-project:master Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants