render with custom output types #752
karelvaculik
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I was wondering if it would make sense to extend the
render
method to support other output types thanuint8
.Specifically,
render
method ofTFPyEnvironment
converts all outputs intouint8
.I am aware that the type makes sense for plotting images (and
render
method is primarily designated for this purpose), but when I create a custom environment, I would like to be able to pass general array from the environment, e.g. an array offloat32
values, and then print / plot it my way. Let's say I have quite a complex environment that produces observations with transformed values. Such observations are good to feed into agents (neural networks), but they are not useful for debugging / illustration when checking my agent on an eval environment. What's more important is that it's hard to convert the transformed values into a useful representation for humans. Therefore I thought I could userender
method to fetch the observation in a "human-understandable" form (i.e. not transformed).I noticed the note in docstring that the conversion into
uint8
is due to compatibility reasons, but I believe it could be still extended (e.g. through a new parameter) in such a way that the default behaviour would satisfy this conversion touint8
- to keep the compatibility intact.Beta Was this translation helpful? Give feedback.
All reactions