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

num_env_step not work in RolloutWrapper #79

Open
jinPrelude opened this issue Jun 23, 2024 · 0 comments
Open

num_env_step not work in RolloutWrapper #79

jinPrelude opened this issue Jun 23, 2024 · 0 comments

Comments

@jinPrelude
Copy link

Issue

environment made by RolloutWrapper doesn't reflect num_env_step variable which we put into RolloutWrapper:

Code for reproduction

from gymnax.experimental import RolloutWrapper
import jax

ENV_NUM = 3
manager = RolloutWrapper(None, env_name='CartPole-v1', num_env_steps=100)

rng, rollout_rng = jax.random.split(jax.random.key(0))
rollout_rng = jax.random.split(rollout_rng, ENV_NUM)
obs, action, reward, next_obs, done, cum_ret = manager.batch_rollout(rollout_rng, None)
print(done.shape) # it should print (3, 100), but the result is (3, 500)
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

No branches or pull requests

1 participant