-
Notifications
You must be signed in to change notification settings - Fork 158
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
Eval stats collector #80
Conversation
/test |
Successfully created a job for commit 3326b59: |
/test |
Successfully created a job for commit 53eaa8a: |
/test |
Successfully created a job for commit 88ce4cb: |
/test |
Successfully created a job for commit fe82aba: |
/test |
Successfully created a job for commit 2b7b0f7: |
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.
The new API looks good, and I verified it works by writing a wrapper that calculates success rate for OpenAI Gym robot env: https://github.com/muupan/pfrl/blob/her-fetch/examples/her/train_ddpg_her_fetch.py#L15
We currently collect basic performance statistics as well as agent statistics. This PR allows environment statistics to be collected. This gives a lot of flexibility. For example, if you have a binary success task such as grasping, your environment could give a "success" statistic, in addition to the reward. If you have a finance domain, your environment could track "profit" separate from the reward function.
The environment optionally implements two functions:
get_statistics
andclear_statistics
. If these functions are not implemented, then the evaluator works as it did before (i.e. this PR is backwards compatible).get_statistics
: Returns the environment statistics. Defaults to returning an empty list if the environment doesn't implement it.clear_statistics
: Clears the statistics. This is called before evaluation so thatget_statistics
only returns statistics collected during evaluation. By default does nothing ifclear_statistics
isn't implemented by the environment.