-
Notifications
You must be signed in to change notification settings - Fork 6k
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] Add MetricsLogger
to connector- and pipeline-calls.
#49693
[RLlib] Add MetricsLogger
to connector- and pipeline-calls.
#49693
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.
batch={}, | ||
episodes=episodes_flat, | ||
shared_data={}, | ||
metrics=self.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.
Nice!
@@ -99,14 +99,16 @@ def __call__( | |||
# Loop through connector pieces and call each one with the output of the | |||
# previous one. Thereby, time each connector piece's call. | |||
for connector in self.connectors: | |||
timer = self.timers[str(connector)] | |||
with timer: | |||
with metrics.log_time( |
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.
Nice implementation!
**kwargs, | ||
) | ||
|
||
# Log the sum of lengths of all episodes outgoing. | ||
if 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.
Sweet! I will log similar values in the buffers.
@@ -258,6 +258,9 @@ def __call__(self, batch: Dict[str, np.ndarray]) -> Dict[str, List[EpisodeType]] | |||
batch={}, | |||
episodes=episodes, | |||
shared_data={}, | |||
# TODO (sven): Add MetricsLogger to non-Learner components that have a |
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.
Good comment! I can take a look at the PreLearner
and Offline RL in general, if you want me to.
…metrics_to_connector_pipelines
…metrics_to_connector_pipelines
…metrics_to_connector_pipelines
…oject#49693) Signed-off-by: Roshan Kathawate <roshankathawate@gmail.com>
…oject#49693) Signed-off-by: lielin.hyl <lielin.hyl@alibaba-inc.com>
Add
MetricsLogger
to connector- and pipeline-calls.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.