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

Extend unit tests for metrics to cover resetting the state variables #230

Open
jneeven opened this issue Sep 19, 2019 · 0 comments
Open
Labels
internal-improvement Internal Improvements and Maintenance

Comments

@jneeven
Copy link
Contributor

jneeven commented Sep 19, 2019

Feature motivation

Rather than relying on the default Metric.reset_state() function to correctly reset all variables that should be reset, we should explicitly have a unit test that verifies this for each relevant variable.

Feature description

Since reset_state() doesn't return a tensorflow op, it is not trivial to test this in the current testing ecosystem (calling self.evaluate(metric.reset_state()) will return an error, as reset_state() returns None). Ideally, we should find a way to test this that doesn't compromise ease of use (i.e. we don't want to change the reset function to manually contain a reset operation for each variable, as this doesn't scale well to subclasses with custom variables).

@lgeiger lgeiger added the internal-improvement Internal Improvements and Maintenance label Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-improvement Internal Improvements and Maintenance
Projects
None yet
Development

No branches or pull requests

2 participants