From 1f6590ceb38a480d1cef01ec3fa9b5659ab0cccf Mon Sep 17 00:00:00 2001 From: Madhur Karampudi Date: Wed, 18 Dec 2024 09:31:57 -0800 Subject: [PATCH] Remove unused keyword arguments to Keras Model.save and Model.load. PiperOrigin-RevId: 707577369 --- fairness_indicators/example_model_test.py | 2 +- setup.py | 10 +++++----- tensorboard_plugin/setup.py | 8 ++++---- .../tensorboard_plugin_fairness_indicators/plugin.py | 3 ++- .../plugin_test.py | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fairness_indicators/example_model_test.py b/fairness_indicators/example_model_test.py index 09266a2..8be9fa4 100644 --- a/fairness_indicators/example_model_test.py +++ b/fairness_indicators/example_model_test.py @@ -91,7 +91,7 @@ def test_example_model(self): ]), batch_size=1, ) - classifier.save(self._model_dir, save_format='tf') + tf.saved_model.save(classifier, self._model_dir) eval_config = text_format.Parse( """ diff --git a/setup.py b/setup.py index 0451434..9ee89c9 100644 --- a/setup.py +++ b/setup.py @@ -38,15 +38,15 @@ def select_constraint(default, nightly=None, git_master=None): return default REQUIRED_PACKAGES = [ - 'tensorflow>=2.15,<2.16', + 'tensorflow>=2.16,<2.17', 'tensorflow-hub>=0.16.1,<1.0.0', 'tensorflow-data-validation' + select_constraint( - default='>=1.15.1,<2.0.0', - nightly='>=1.16.0.dev', + default='>=1.16.1,<2.0.0', + nightly='>=1.17.0.dev', git_master='@git+https://github.com/tensorflow/data-validation@master'), 'tensorflow-model-analysis' + select_constraint( - default='>=0.46,<0.47', - nightly='>=0.47.0.dev', + default='>=0.47.0,<0.48.0', + nightly='>=0.48.0.dev', git_master='@git+https://github.com/tensorflow/model-analysis@master'), 'witwidget>=1.4.4,<2', 'protobuf>=3.20.3,<5', diff --git a/tensorboard_plugin/setup.py b/tensorboard_plugin/setup.py index 6663771..a097a48 100644 --- a/tensorboard_plugin/setup.py +++ b/tensorboard_plugin/setup.py @@ -43,12 +43,12 @@ def select_constraint(default, nightly=None, git_master=None): REQUIRED_PACKAGES = [ 'protobuf>=3.20.3,<5', - 'tensorboard>=2.15.2,<2.16.0', - 'tensorflow>=2.15,<2.16', + 'tensorboard>=2.16.2,<2.17.0', + 'tensorflow>=2.16,<2.17', 'tensorflow-model-analysis' + select_constraint( - default='>=0.46,<0.47', - nightly='>=0.47.0.dev', + default='>=0.47,<0.48', + nightly='>=0.48.0.dev', git_master='@git+https://github.com/tensorflow/model-analysis@master', ), 'werkzeug<2', diff --git a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin.py b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin.py index f3e1856..69390be 100644 --- a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin.py +++ b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin.py @@ -23,7 +23,8 @@ from tensorboard_plugin_fairness_indicators import metadata import six import tensorflow_model_analysis as tfma -from tensorflow_model_analysis.addons.fairness.view import widget_view +# from tensorflow_model_analysis.addons.fairness.view import widget_view +from tensorflow_model_analysis.view import widget_view from werkzeug import wrappers from google.protobuf import json_format from tensorboard.backend import http_util diff --git a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py index e465bef..f58b252 100644 --- a/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py +++ b/tensorboard_plugin/tensorboard_plugin_fairness_indicators/plugin_test.py @@ -28,7 +28,7 @@ import tensorflow.compat.v1 as tf import tensorflow.compat.v2 as tf2 import tensorflow_model_analysis as tfma -from tensorflow_model_analysis.eval_saved_model.example_trainers import linear_classifier +from tensroflow_model_anlaysis.view.eval_saved_model.example_trainers import linear_classifier from werkzeug import test as werkzeug_test from werkzeug import wrappers