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

Fix check_env for Sequence observation space #1690

Merged
merged 5 commits into from
Sep 24, 2023

Conversation

corentinlger
Copy link
Contributor

@corentinlger corentinlger commented Sep 21, 2023

Add a condition to check if observation space of an environment is Sequence in the "_check_unsupported_spaces". Add a condition to stop the "check_env" function is this type of obs space is detected (only if warn=True).

Should I solve the issue a different way ?

I had a segmentation fault error while running make pytest.

Description

closes #1683

Motivation and Context

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist

  • I've read the CONTRIBUTION guide (required)
  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have opened an associated PR on the SB3-Contrib repository (if necessary)
  • I have opened an associated PR on the RL-Zoo3 repository (if necessary)
  • I have reformatted the code using make format (required)
  • I have checked the codestyle using make check-codestyle and make lint (required)
  • I have ensured make pytest and make type both pass. (required)
  • I have checked that the documentation builds using make doc (required)

Note: You can run most of the checks using make commit-checks.

Note: we are using a maximum length of 127 characters per line

@araffin
Copy link
Member

araffin commented Sep 21, 2023

Hello,

Should I solve the issue a different way ?

looks good but you should add a test.

@corentinlger
Copy link
Contributor Author

I launched the test and it was ok up until 94%. Then I had a segmentation fault (error 139) :

"""
tests/test_vec_envs.py::test_render[DummyVecEnv] Fatal Python error: Segmentation fault
"""

I didn't see any similar case in the issues. Do you know why it could have happened ? (I already had this problem when I launched the test for another issue)

@araffin
Copy link
Member

araffin commented Sep 21, 2023

tests/test_vec_envs.py::test_render[DummyVecEnv] Fatal Python error: Segmentation fault

you can safely ignore that test.

@corentinlger
Copy link
Contributor Author

looks good but you should add a test.

I am kind of confused about the test you talked about . You meant adding an automatic test in the test_env_checker.py file ?

@araffin araffin changed the title Bug fix/issue 1683 - Fix check_env for Sequence observation space Fix check_env for Sequence observation space Sep 24, 2023
Copy link
Member

@araffin araffin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks =)

@araffin araffin merged commit f4c5b1e into DLR-RM:master Sep 24, 2023
4 checks passed
@corentinlger
Copy link
Contributor Author

You're welcome ! Thanks for the lib (:

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]: stable_baselines3.common.env_checker.check_env throws misleading error
2 participants