-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add secondary custom callback for logging step wise information #23
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.
Looks very good. Thanks for the work. I have a few suggestions to streamline and reduce doubled variables.
There might be some comments that are not 100% correct if you use the suggestions directly. Also, as always, changes via github are not tested :D.
The test error is most likely due to different numpy version. I think I had changed that exact test during the last PR. Let's look into that so that this error is not persistent. |
for more information, see https://pre-commit.ci
Co-authored-by: clemens.fricke <[email protected]>
f75cc51
to
5380aa4
Compare
…flag in the hjson input)
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 the really good work.
With this PR, I propose the implementation of a second callback class, similar to the already existing
EpisodeLogCallback
, which tracks stepwise information.The motivation for this extension was to simplify the evaluation of trainings by allowing to better understand the policy learned by the agent from investigating and reconstructing the trajectory (i.e., sequence of actions) undertaken in each episode.
Overview of the
StepInformationLogCallback
Information logged
The following information is currently collected in each step and will be logged to a separate csv file:
Configuration possibilities
The
StepInformationLogCallback
will create a csv file similar to the already existingepsiode_log.csv
which contains the information outlined above. At the moment, the frequency with which information will be written to the csv file can be configured via thestep_log_update
parameter in the input .json file:episode
, meaning that the callback will record the information from all steps within an episode and only write new information to the csv file once the episode is completedOpen questions / issues
General questions
EpisodeLogCallback
StepInformationLogCallback
differs in style from the already existingEpisodeLogCallback
Problems during testing
ERROR tests/test_util_funcs.py - AttributeError: module 'numpy' has no attribute 'float128'
when trying to invokepytest
in the top level directory of the repository from within a freshly created conda environment. However I tested the callback in a small example script and will provide the output blow as additional information to this PR.Additional information
An example
step_log.csv
from a simple test of this callback can be found below:step_log.csv