-
Notifications
You must be signed in to change notification settings - Fork 6.2k
[RLlib] Episode API: Add custom_data
property and deprecate add|get_temporary_timestep_data()
APIs.
#52603
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] Episode API: Add custom_data
property and deprecate add|get_temporary_timestep_data()
APIs.
#52603
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. This is convenient for users and for us: we do not have to manage access or check at whcih points to cut or merge.
self._temporary_timestep_data = defaultdict(list) | ||
# Cache for custom data. May be used to store custom metrics from within a | ||
# callback for the ongoing episode (e.g. render images). | ||
self.custom_data = {} |
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 we should set this private and give it a setter such that users can manipulate what is IN it but not the attribute itself.
Episode API: Add
custom_data
property and deprecateadd|get_temporary_timestep_data()
APIs.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.