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

Fixes Sb3VecEnvWrapper to clear buffer on reset #974

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

EricJin2002
Copy link
Contributor

Description

In previous version of the SB3 environment wrapper, the episode buffer was not cleared when env.reset was called. This led to an overestimation of the number of time-steps and rewards in subsequent episodes, as reflected in the infos returned by env.steps. This commit aims to address this.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

In previous version of the SB3 environment wrapper, the episode buffer was not cleared when `env.reset` was called. This led to an overestimation of the number of time-steps and rewards in subsequent episodes, as reflected in the `infos` returned by `env.steps`. This commit aims to address this.
Copy link
Contributor

@Mayankm96 Mayankm96 left a comment

Choose a reason for hiding this comment

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

Sounds good. Doesn't hurt the normal workflow so if it resolves the issue then I'm okay with merging it :)

@Mayankm96 Mayankm96 merged commit 5444fa3 into isaac-sim:main Sep 12, 2024
1 check failed
iamdrfly pushed a commit to iamdrfly/IsaacLab that referenced this pull request Nov 21, 2024
# Description

In previous version of the SB3 environment wrapper, the episode buffer
was not cleared when `env.reset` was called. This led to an
overestimation of the number of time-steps and rewards in subsequent
episodes, as reflected in the `infos` returned by `env.steps`. This
commit aims to address this.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ]  I have made corresponding changes to the documentation
- [x]  My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
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