-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 gradient logging as default. #47451
[RLlib] Add gradient logging as default. #47451
Conversation
…om clipping to log the global norm to results. Added option to 'AlgorithmConfig.debugging' and set default to 'True'. Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
This is great! Left some questions/nits. ... |
Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
rllib/algorithms/algorithm_config.py
Outdated
@@ -500,6 +500,7 @@ def __init__(self, algo_class: Optional[type] = None): | |||
self.logger_config = None | |||
self.log_level = "WARN" | |||
self.log_sys_usage = True | |||
self.log_gradients = True |
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.
nit nit: Can you move this to the default-value block, that's headered with reporting()
. Keeps the c'tor structured.
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! Moved it to reporting defaults.
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. Just please move the default value in the AlgorithmConfig constructor into the block commented as # .reporting()
.
Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
…. This resulted in an error before. Signed-off-by: simonsays1980 <[email protected]>
…ad of a list. Signed-off-by: simonsays1980 <[email protected]>
…ming out. Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: ujjawal-khare <[email protected]>
Why are these changes needed?
Gradients logging is highly important for training neural networks. It enables users to monitor training performance and health. Right now, a user can only monitor gradients when she uses clipping and then also only, if the
"global_norm"
is used for clipping. This PR instead proposes gradients logging as a default option in RLlib.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.