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

Env creation tutorial 2 fix observation space #1037

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

BertrandDecoster
Copy link
Contributor

Description

The observation space was too small. For example, for the observation returned after a reset(), the guard is at the extreme corner, which is indexed 48. However, the current observation space can only go up to 47

Related question : should the tests like parallel_api_test() check that the observations are consistent with the observation spaces? This could have been easily caught (cf tutorial 4)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

It's just a doc change

@BertrandDecoster
Copy link
Contributor Author

Same thing, once it's validated, I'll C/C the changes to tutorial 3

@elliottower
Copy link
Contributor

This is actually a good point, if you are interested in updating the API tests to actually check that the observations are in the correct spaces that would be great. It would be simpler to include all of these changes in a single PR but I like doing web commits which only allow you to change a single file so I get it (you can also just click on the patch in your browser and then go into the file tree and change other files that way, so multiple changes are on one patch)

@elliottower
Copy link
Contributor

I don't want to approve this until either I or the CI manually go through and check that the environment outputs the correct observation shape (and I'm pretty busy so if you'd be able to create that it would be a huge help, also for future PRs as you mention)

@elliottower
Copy link
Contributor

Going to merge this but if you're interested in adding a test to check that the observation and observation space match up (in a separate PR) that would be great

@elliottower elliottower merged commit 8e16523 into Farama-Foundation:master Jul 24, 2023
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