You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cool!
FYI it's part of this PR pytorch/rl#2129
which enables rendering of envs using from_pixels=True in torchrl
Sort of personal request: It'd be nice to have a way to ask for headless rendering / rgb_arrays in a consistent way (from my 10K feet high view it seems envs have a different way of dealing with rendering). Something like make(envname, rgb_array=True) or render(rgb_array=True).
For torchrl, we prefer always getting arrays of uint8 and deliver them to the users as part of their env output and leave them deal with them as they want (if the user wants to render smth they can just call plt.imshow(data["pixels"]))
Having the human rendering by default usually introduces some consequent overhead.
The way the above PR deals with this is to render on screen, record the content of the plt image in a buffer, convert that buffer to a tensor (since there is no generic way of getting a rgb).
Calling render on "CVRP-v1" doesn't work because the docs/img/city_map.jpeg file cannot be opened:
jumanji/jumanji/environments/routing/tsp/viewer.py
Line 137 in 823830e
Perhaps a way of downloading that file in a cache could solve the issue?
The text was updated successfully, but these errors were encountered: