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: step type in autoreset wrapper #106

Closed
dluo96 opened this issue Mar 29, 2023 · 1 comment
Closed

fix: step type in autoreset wrapper #106

dluo96 opened this issue Mar 29, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dluo96
Copy link
Contributor

dluo96 commented Mar 29, 2023

Is your feature request related to a problem? Please describe

When using AutoResetWrapper, the sequence of timestep.step_type returned during a rollout shows 0 values where the env has been auto reset instead of 2 values. Recall that

  • 0 corresponds to the first step
  • 1 corresponds to a mid step
  • 2 corresponds to the last step

Describe the solution you'd like

Move the auto reset bug: [1, 1, 1, 2, 0, 1, 1, 1] has to be converted to [1, 1, 1, X, 1, 1, 1] with X being 0 or 2. Right now it is 0 but it should be 2 to warn the user that the episode got terminated. This would be important e.g. if using while not timestep.last().

timestep = timestep.replace(  # type: ignore
    observation=reset_timestep.observation
)
@dluo96 dluo96 added enhancement New feature or request good first issue Good for newcomers labels Mar 29, 2023
@clement-bonnet
Copy link
Collaborator

Got fixed in #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants