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

[Bug Report] shallow copy of info and observation after termination #1132

Open
1 task done
VictorTao1998 opened this issue Aug 4, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@VictorTao1998
Copy link

Describe the bug

when using async_vector_env, the info after termination of one episode is wrong, it returns the info from reset() instead of step()

Code example

in gymnasium/vector/async_vector_env.py 642:646
if terminated or truncated:
                    old_observation, old_info = observation, info
                    observation, info = env.reset()
                    info["final_observation"] = old_observation
                    info["final_info"] = old_info

I think there should be a deepcopy for the old_observation and old_info here.

System info

gymnasium==0.29.1

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo
@VictorTao1998 VictorTao1998 added the bug Something isn't working label Aug 4, 2024
@VictorTao1998 VictorTao1998 changed the title [Bug Report] Bug title [Bug Report] shallow copy of info and observation after termination Aug 4, 2024
@pseudo-rnd-thoughts
Copy link
Member

Thanks for the issue but your message and title seem to be about different things.

  1. For when reset occurs (autoreset), for gym < 1, this is intentional and we are changing this in v1.0
  2. For no deepcopy of obs, info, could you provide an example where this is an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants