From dbd8c130def39efd2b39d62ed74e3f601e494b5e Mon Sep 17 00:00:00 2001 From: matrixzhou Date: Tue, 15 Oct 2024 10:50:37 -0700 Subject: [PATCH] Remove dependency on eval_saved_model from metrics_plots_and_validations_evaluator_test.py PiperOrigin-RevId: 686162129 --- .../metrics_plots_and_validations_evaluator_test.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py b/tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py index e04c2413c7..dd5840f506 100644 --- a/tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py +++ b/tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py @@ -22,7 +22,6 @@ import tensorflow as tf from tensorflow_model_analysis import constants from tensorflow_model_analysis.api import model_eval_lib -from tensorflow_model_analysis.eval_saved_model import testutil from tensorflow_model_analysis.evaluators import metrics_plots_and_validations_evaluator from tensorflow_model_analysis.extractors import example_weights_extractor from tensorflow_model_analysis.extractors import features_extractor @@ -40,6 +39,7 @@ from tensorflow_model_analysis.metrics import metric_types from tensorflow_model_analysis.proto import config_pb2 from tensorflow_model_analysis.proto import validation_result_pb2 +from tensorflow_model_analysis.utils import test_util as testutil from tensorflow_model_analysis.utils.keras_lib import tf_keras from tfx_bsl.tfxio import tensor_adapter from tfx_bsl.tfxio import test_util @@ -73,7 +73,7 @@ def _build_keras_model(self, model_name, model_dir, mul): ) model.save(model_dir, save_format='tf') return self.createTestEvalSharedModel( - model_name=model_name, eval_saved_model_path=model_dir + model_name=model_name, model_path=model_dir ) def testFilterAndSeparateComputations(self): @@ -957,9 +957,7 @@ def testEvaluateWithKerasModelWithInGraphMetrics(self, add_custom_metrics): ], ), ) - eval_shared_model = self.createTestEvalSharedModel( - eval_saved_model_path=export_dir - ) + eval_shared_model = self.createTestEvalSharedModel(model_path=export_dir) examples = [ self._makeExample(