diff options
author | Jon Perl <perl.jonathan@gmail.com> | 2018-07-15 19:57:10 -0400 |
---|---|---|
committer | Jon Perl <perl.jonathan@gmail.com> | 2018-07-15 19:57:10 -0400 |
commit | 05f41cb39598fcdcd4510cdf1c1bf4b4c9fe4868 (patch) | |
tree | 284eb48e913cdd8e5298388d2d17d9df8c7625e6 /tensorflow/contrib/estimator | |
parent | 6c3c766dcabff3b5fa41dbfd491c9e8062a77b07 (diff) |
Test the timer in InMemoryEvaluatorHook
This failing test demonstrates a bug that all iterations are running
Diffstat (limited to 'tensorflow/contrib/estimator')
-rw-r--r-- | tensorflow/contrib/estimator/python/estimator/hooks_test.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/contrib/estimator/python/estimator/hooks_test.py b/tensorflow/contrib/estimator/python/estimator/hooks_test.py index 95ae971852..e094dade6a 100644 --- a/tensorflow/contrib/estimator/python/estimator/hooks_test.py +++ b/tensorflow/contrib/estimator/python/estimator/hooks_test.py @@ -102,6 +102,7 @@ class InMemoryEvaluatorHookTest(test.TestCase): self.assertTrue(os.path.isdir(estimator.eval_dir())) step_keyword_to_value = summary_step_keyword_to_value_mapping( estimator.eval_dir()) + # 4.5 = sum(range(10))/10 # before training self.assertEqual(4.5, step_keyword_to_value[0]['mean_of_features']) @@ -110,6 +111,7 @@ class InMemoryEvaluatorHookTest(test.TestCase): self.assertEqual(4.5, step_keyword_to_value[8]['mean_of_features']) # end self.assertEqual(4.5, step_keyword_to_value[10]['mean_of_features']) + self.assertEqual([0, 4, 8, 10], list(step_keyword_to_value.keys())) def test_uses_latest_variable_value(self): |