Skip to content
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 a callback to log raw stats #216

Merged
merged 7 commits into from
Mar 22, 2022
Merged

Conversation

vwxyzjn
Copy link
Contributor

@vwxyzjn vwxyzjn commented Mar 7, 2022

This PR adds a callback to log raw (unaveraged) stats such as episodic_length, episodic_returns. The testing command is python train.py --algo ppo --env CartPole-v1 -params callback:'"utils.callbacks.RawStatisticsCallback"' --track and it produces this run

image

Motivation and Context

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist:

  • I've read the CONTRIBUTION guide (required)
  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have reformatted the code using make format (required)
  • I have checked the codestyle using make check-codestyle and make lint (required)
  • I have ensured make pytest and make type both pass. (required)

Note: we are using a maximum length of 127 characters per line

@vwxyzjn
Copy link
Contributor Author

vwxyzjn commented Mar 7, 2022

@araffin also suggested I do the same for EvalCallback. So I see that ExperimentManager already uses the EvalCallback, so am I replacing the EvalCallback with something like RawStatsEvalCallback?

@araffin
Copy link
Member

araffin commented Mar 8, 2022

@araffin also suggested I do the same for EvalCallback.

ah no, there was some misunderstanding on that.

@araffin
Copy link
Member

araffin commented Mar 8, 2022

@vwxyzjn I had to do a PR to your fork as I couldn't push to it :/

Fixes and use tensorboard output directly
Copy link
Member

@araffin araffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check what I did?
if you add test and update changelog, we are good to go ;)

@vwxyzjn
Copy link
Contributor Author

vwxyzjn commented Mar 13, 2022

Added a test case and updated the changelog :)

Copy link
Member

@araffin araffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM =)

@vwxyzjn
Copy link
Contributor Author

vwxyzjn commented Mar 22, 2022

Awesome. Fell free to merg

@vwxyzjn vwxyzjn closed this Mar 22, 2022
@vwxyzjn vwxyzjn reopened this Mar 22, 2022
@vwxyzjn
Copy link
Contributor Author

vwxyzjn commented Mar 22, 2022

Awesome. Feel free to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants