Skip to content

Commit

Permalink
Remove dependency on eval_saved_model from metrics_plots_and_validati…
Browse files Browse the repository at this point in the history
…ons_evaluator_test.py

PiperOrigin-RevId: 686162129
  • Loading branch information
zhouhao138 authored and tfx-copybara committed Oct 15, 2024
1 parent 8f4fea9 commit dbd8c13
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit dbd8c13

Please sign in to comment.