[go: nahoru, domu]

Skip to content

Commit

Permalink
Small cleanup to CachedImplTest.test_tf_function_works_with_cache
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 368225087
  • Loading branch information
zoyahav authored and tf-transform-team committed Apr 13, 2021
1 parent c7c9573 commit dde3a30
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tensorflow_transform/beam/cached_impl_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,11 +1114,6 @@ def identity(x):
self.assertMetricsCounterEqual(p2.metrics, 'saved_models_created',
_ZERO_PHASE_NUM_SAVED_MODELS)

self.assertMetricsCounterEqual(p2.metrics, 'num_instances', 0)
self.assertMetricsCounterEqual(p2.metrics, 'cache_entries_decoded', 1)
self.assertMetricsCounterEqual(p2.metrics, 'cache_entries_encoded', 0)
self.assertMetricsCounterEqual(p2.metrics, 'saved_models_created', 1)

# Modifying the tf.function contents causes cache invalidation.
run_result = self._run_pipeline(
feature_spec,
Expand All @@ -1135,7 +1130,8 @@ def identity(x):
self.assertMetricsCounterEqual(p3.metrics, 'num_instances', 2)
self.assertMetricsCounterEqual(p3.metrics, 'cache_entries_decoded', 0)
self.assertMetricsCounterEqual(p3.metrics, 'cache_entries_encoded', 1)
self.assertMetricsCounterEqual(p3.metrics, 'saved_models_created', 2)
self.assertMetricsCounterEqual(p3.metrics, 'saved_models_created',
_SINGLE_PHASE_NUM_SAVED_MODELS)

@tft_unit.named_parameters(_TF_VERSION_NAMED_PARAMETERS)
def test_changing_constant_fails_cache(self, use_tf_compat_v1):
Expand Down

0 comments on commit dde3a30

Please sign in to comment.