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

[Question] Can Env.render take arguments? #283

Closed
qgallouedec opened this issue Jan 23, 2023 · 4 comments
Closed

[Question] Can Env.render take arguments? #283

qgallouedec opened this issue Jan 23, 2023 · 4 comments
Labels
question Further information is requested

Comments

@qgallouedec
Copy link
Contributor

Question

This line suggests that it is possible to pass [keyword] arguments to the gym.Env.render method.

render = self.env.render(*args, **kwargs)

Which seems not to be consistent with how gym.Env is implemented in core.

def render(self) -> RenderFrame | list[RenderFrame] | None:

Am I right?

@qgallouedec qgallouedec added the question Further information is requested label Jan 23, 2023
@qgallouedec qgallouedec changed the title [Question] Question title [Question] Can Env.render take arguments? Jan 23, 2023
@RedTachyon
Copy link
Member

It used to be the case that env.render() would take arguments, but we changed it a few releases ago. Now you set it with env = gym.make(..., render_mode="rgb_array"), and call env.render() without any arguments. The code you mentioned hasn't been properly updated since, although technically speaking I guess it doesn't really break anything.

@qgallouedec
Copy link
Contributor Author

qgallouedec commented Jan 24, 2023

Thanks for the clarification. Then the render_kwargs arg in the constructor is inoperative right?

@qgallouedec
Copy link
Contributor Author

I've just seen #301 (comment). Should we consider PixelObservationWrapper as deprecated then? I read in your roadmap #12 "Release v0.29.0 as an intermediate version with experimental functional, new wrappers and vectors to root". Does it mean that PixelObservationWrapper is going to be replaced by experimental.wrappers.PixelObservationv0 in 0.29?

@pseudo-rnd-thoughts
Copy link
Member

The roadmap needs to be updated for a new release in the next week not listed on the roadmap so it will replace PixelObservationWrapper in v0.31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants