Skip to content

Eval stats collector#80

Merged
muupan merged 10 commits into
pfnet:masterfrom
prabhatnagarajan:eval_stats_collector
Nov 12, 2020
Merged

Eval stats collector#80
muupan merged 10 commits into
pfnet:masterfrom
prabhatnagarajan:eval_stats_collector

Conversation

@prabhatnagarajan

Copy link
Copy Markdown
Contributor

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 and clear_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 that get_statistics only returns statistics collected during evaluation. By default does nothing if clear_statistics isn't implemented by the environment.

@github-actions github-actions Bot requested a review from muupan October 7, 2020 05:14
@prabhatnagarajan

Copy link
Copy Markdown
Contributor Author

/test

@pfn-ci-bot

Copy link
Copy Markdown

Successfully created a job for commit 3326b59:

@prabhatnagarajan

Copy link
Copy Markdown
Contributor Author

/test

@pfn-ci-bot

Copy link
Copy Markdown

Successfully created a job for commit 53eaa8a:

@prabhatnagarajan

Copy link
Copy Markdown
Contributor Author

/test

@pfn-ci-bot

Copy link
Copy Markdown

Successfully created a job for commit 88ce4cb:

@prabhatnagarajan

Copy link
Copy Markdown
Contributor Author

/test

@pfn-ci-bot

Copy link
Copy Markdown

Successfully created a job for commit fe82aba:

@prabhatnagarajan

Copy link
Copy Markdown
Contributor Author

/test

@pfn-ci-bot

Copy link
Copy Markdown

Successfully created a job for commit 2b7b0f7:

@muupan muupan left a comment

Copy link
Copy Markdown
Member

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

@muupan muupan merged commit 7b2d734 into pfnet:master Nov 12, 2020
@prabhatnagarajan prabhatnagarajan deleted the eval_stats_collector branch November 12, 2020 09:57
@muupan muupan added the enhancement New feature or request label Dec 11, 2020
@muupan muupan added this to the v0.2.0 milestone Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants