-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[GymAPI Question] why new render api was introduced? #2855
Comments
Hello @Denys88, All the reasons can be found in these discussions: #2540 #2671 TL;DR If an environment can work with single render calls, it should provide a custom mode for single rendering, e.g. single_rgb_array. In this way, the environment will not perform the computation during training, and you can call I hope this answers your question; please let me know if there are other major issues with this new API. |
thanks for the answer @younik it explains your motivation. |
Can you provide a use case when |
one of the examples: But if I have enable_render call I dont need to have different construction code for envs. |
In these examples, you will be able to use the single rendering mode, and everything will be as before. For example, you can pass single_rgb_array to the vectorized environments and then call The real limitation of this new API is that it doesn't natively support render mode changing on the fly. For the rest, this will remain pretty general, we allow the different environment to define their supported behaviour. |
Question
Previously I was able to use same config with env configuration to create environment and then render it when I want to.
Now I need to pass render_mode to the constructor.
It is very inconvenient right now because I need to have different configuration setup for training and testing.
I don't any good reason why this parameter should be passed to the constructor. I am not even talking about a lot of broken environments because of the backward compatibility.
is there any way to turn on/off rendering now?
The text was updated successfully, but these errors were encountered: