diff --git a/RELEASE.md b/RELEASE.md index 49d05bcd69..e902206401 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -18,6 +18,7 @@ * Fixes a bug by ensuring feature values are always numpy arrays. * Modifies a ROUGE Test to be compatible with NumPy v2.0.1. * Remove keras_util_test.py which is based on estimator models. +* Remove dependency on eval_saved_model encodings. ## Breaking Changes diff --git a/tensorflow_model_analysis/slicer/slice_accessor_test.py b/tensorflow_model_analysis/slicer/slice_accessor_test.py index 07551abbee..90f8d949e5 100644 --- a/tensorflow_model_analysis/slicer/slice_accessor_test.py +++ b/tensorflow_model_analysis/slicer/slice_accessor_test.py @@ -18,9 +18,10 @@ import pyarrow as pa import tensorflow as tf from tensorflow_model_analysis.api import types -from tensorflow_model_analysis.eval_saved_model import encoding from tensorflow_model_analysis.slicer import slice_accessor +_ENCODING_NODE_SUFFIX = 'node' + class SliceAccessorTest(tf.test.TestCase, parameterized.TestCase): @@ -78,21 +79,11 @@ def testLegacyAccessFeaturesDict(self): ) = sess.run( fetches=[sparse, dense, dense_single, dense_multidim, squeeze_needed]) features_dict = { - 'sparse': { - encoding.NODE_SUFFIX: sparse_value - }, - 'dense': { - encoding.NODE_SUFFIX: dense_value - }, - 'dense_single': { - encoding.NODE_SUFFIX: dense_single_value - }, - 'squeeze_needed': { - encoding.NODE_SUFFIX: squeeze_needed_value - }, - 'dense_multidim': { - encoding.NODE_SUFFIX: dense_multidim_value - }, + 'sparse': {_ENCODING_NODE_SUFFIX: sparse_value}, + 'dense': {_ENCODING_NODE_SUFFIX: dense_value}, + 'dense_single': {_ENCODING_NODE_SUFFIX: dense_single_value}, + 'squeeze_needed': {_ENCODING_NODE_SUFFIX: squeeze_needed_value}, + 'dense_multidim': {_ENCODING_NODE_SUFFIX: dense_multidim_value}, } accessor = slice_accessor.SliceAccessor([features_dict]) self.assertEqual([b'apple', b'banana'], accessor.get('sparse'))