From 316660063aaaaeb95b63d08a54e746934de659c0 Mon Sep 17 00:00:00 2001 From: Allen Lavoie Date: Tue, 11 Dec 2018 12:15:01 -0800 Subject: [PATCH] Remove/avoid deprecation warnings in 2.x saving utilities Having the warning on little-used 1.x utilities isn't super important, but the 2.x utilities shouldn't print them during normal use for sure. PiperOrigin-RevId: 225047956 --- tensorflow/python/training/checkpoint_management.py | 4 ---- tensorflow/python/training/checkpointable/util.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tensorflow/python/training/checkpoint_management.py b/tensorflow/python/training/checkpoint_management.py index f745ab4824a..a7ad1f70e5e 100644 --- a/tensorflow/python/training/checkpoint_management.py +++ b/tensorflow/python/training/checkpoint_management.py @@ -56,10 +56,6 @@ def _GetCheckpointFilename(save_dir, latest_filename): return os.path.join(save_dir, latest_filename) -@deprecation.deprecated( - date=None, - instructions=("Use tf.train.CheckpointManager to manage checkpoints rather " - "than editing the Checkpoint proto manually.")) @tf_export(v1=["train.generate_checkpoint_state_proto"]) def generate_checkpoint_state_proto(save_dir, model_checkpoint_path, diff --git a/tensorflow/python/training/checkpointable/util.py b/tensorflow/python/training/checkpointable/util.py index a54f41a54fa..ce1b9c6fc5a 100644 --- a/tensorflow/python/training/checkpointable/util.py +++ b/tensorflow/python/training/checkpointable/util.py @@ -1863,7 +1863,7 @@ class Checkpoint(tracking.Checkpointable): checkpoint_number = assign_op.numpy() file_path = self.write("%s-%d" % (file_prefix, checkpoint_number), session=session) - checkpoint_management.update_checkpoint_state( + checkpoint_management.update_checkpoint_state_internal( save_dir=os.path.dirname(file_prefix), model_checkpoint_path=file_path, all_model_checkpoint_paths=[file_path])