-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[RLlib] Metrics do-over 05: Add example script for a custom render()
method (with WandB videos).
#45107
[RLlib] Metrics do-over 05: Add example script for a custom render()
method (with WandB videos).
#45107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Awesome PR. Some questions in regard to use cases that will occurr earlier or later.
height = 100 | ||
|
||
# Create a new image with white background | ||
image = Image.new("RGB", (width, height), "white") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Note that the default Tune TensorboardX (TBX) logger might complain about the videos | ||
being logged. This is ok, the TBX logger will simply ignore these. The WandB logger, | ||
however, will recognize the video tensors shaped | ||
(1 [batch], T [video len], 3 [rgb], [height], [width]) and properly create a WandB video |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean that we can also log multiple images like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should work:
Just log_value
a numpy uint8 tensor with shape: [N, c, h, w], where N is the number of images. Basically a batch of images.
…` method (with WandB videos). (ray-project#45107)
…` method (with WandB videos). (ray-project#45107) Signed-off-by: pdmurray <peynmurray@gmail.com>
…` method (with WandB videos). (ray-project#45107) Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
…` method (with WandB videos). (ray-project#45107)
Metrics do-over 05: Add example script for a custom
render()
method (with WandB videos).Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.