-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[RLlib] [fix] [metrics] avoid biasing the throughput #57215
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
base: master
Are you sure you want to change the base?
[RLlib] [fix] [metrics] avoid biasing the throughput #57215
Conversation
Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
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.
Great catch! Some Small fixes needed.
… there. Signed-off-by: simonsays1980 <[email protected]>
self.metrics.log_value( | ||
key=(mid, NUM_MODULE_STEPS_TRAINED_LIFETIME), | ||
value=module_batch_size, | ||
reduce="sum", |
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.
In the learner we report this with_throughput=True
Let's add with_throughput=True
here to standardize this and make sure we have consistent metrics.
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'd need to add with_throughput=True
here.
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.
Hey! Added few more comments to make sure that we report metrics consistently for both learner and differentiable_learner.
Thanks for being patient with this PR!
…tialLearner' and fixed some linting. Signed-off-by: simonsays1980 <[email protected]>
7c42aaa
to
ddcaeab
Compare
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.
Just one last edit and we're good to go 🚀
…bleLearner'. Signed-off-by: simonsays1980 <[email protected]>
Why are these changes needed?
Computing the
num_module_steps_trained_(lifetime)_throughput
metrics are biased due to the way how we record throughput times in a loop over module batches. This PR offers a fix to this bias.Related issue number
Checks
git commit -s
) in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.