-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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] Feature/histograms in tensorboard #6942
[rllib] Feature/histograms in tensorboard #6942
Conversation
Can one of the admins verify this patch? |
This is pretty exciting. We really need to get epsiode_reward_[min/max/mean] visualized with TB histograms. For clarification (and so everyone else doesn't have to look at the code) histogram data is located under
Are deeply nested hist_data members supported? Does Thank you!! EDIT: It could also be useful to report training stats from |
Test FAILed. |
@thavlik no nesting here. info['episode'].hist_data[<metric_name>] expects a list of raw values, from which it will compute binned frequencies. See the example in the second commit. In the current implementation, I guess you could name the metric "my_nested/my_histogram_data" to get what you desire, but I haven't tried that. |
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.
Thanks for this change! cc @ericl take a look?
@@ -221,12 +221,15 @@ def close(self): | |||
|
|||
|
|||
def to_tf_values(result, path): | |||
from tensorboardX.summary import make_histogram |
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.
@richardliaw we are using TBXLogger by default now right? So in Ray latest to_tf_values won't be called.
I think this logic should be moved to the TBXLogger class.
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.
(we should also delete this old code).
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.
@roireshef can you push this logic into the TBXLogger class?
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.
I think I got it right, but can't test because I can't get this version to run inside my docker container yet (see #6662). It might take me a while to figure out, so I'd be glad to get your help testing it if you could...
Test PASSed. |
Looks good pending test run. |
Test FAILed. |
Why are these changes needed?
Histograms are super powerful tool to use when the relevant information is hard to get compressed into a single scalar (in case one would be interested in the full distribution, for example).
Related issue number
Closes #4953
Checks
scripts/format.sh
to lint the changes in this PR.