Eval stats collector#80
Merged
Merged
Conversation
Contributor
Author
|
/test |
|
Successfully created a job for commit 3326b59: |
Contributor
Author
|
/test |
|
Successfully created a job for commit 53eaa8a: |
Contributor
Author
|
/test |
|
Successfully created a job for commit 88ce4cb: |
Contributor
Author
|
/test |
|
Successfully created a job for commit fe82aba: |
Contributor
Author
|
/test |
|
Successfully created a job for commit 2b7b0f7: |
muupan
approved these changes
Nov 12, 2020
muupan
left a comment
Member
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_statisticsandclear_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_statisticsonly returns statistics collected during evaluation. By default does nothing ifclear_statisticsisn't implemented by the environment.