aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/checkpoint
diff options
context:
space:
mode:
authorGravatar Allen Lavoie <allenl@google.com>2018-05-04 18:25:18 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-05 08:43:50 -0700
commitdd5ef1b9fc22b37e5eec87d659a3af064ca54b8b (patch)
treef6844070f219cf906c110085d47304ec4ef30c49 /tensorflow/contrib/checkpoint
parent59f0618cedb8fd6ea989471f64ec66619f26b83e (diff)
Checkpointable: A small utility for exempting objects from __setattr__ tracking
Exposes it as tf.contrib.checkpoint.NoDependency. Objects wrapped in a NoDependency object get unwrapped in __setattr__ and not tracked. Removes the _save_counter dependency from tf.train.Checkpoint (the save counter is still tracked as "save_counter" and always has been, so this is a backwards-compatible dependency removal). PiperOrigin-RevId: 195502562
Diffstat (limited to 'tensorflow/contrib/checkpoint')
-rw-r--r--tensorflow/contrib/checkpoint/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/contrib/checkpoint/__init__.py b/tensorflow/contrib/checkpoint/__init__.py
index d2c30f1215..e529b25b3c 100644
--- a/tensorflow/contrib/checkpoint/__init__.py
+++ b/tensorflow/contrib/checkpoint/__init__.py
@@ -19,6 +19,7 @@ For creating and managing dependencies:
@@CheckpointableObjectGraph
@@dot_graph_from_checkpoint
@@object_metadata
+@@NoDependency
@@split_dependency
"""
@@ -29,6 +30,7 @@ from __future__ import print_function
from tensorflow.contrib.checkpoint.python.split_dependency import split_dependency
from tensorflow.contrib.checkpoint.python.visualize import dot_graph_from_checkpoint
from tensorflow.core.protobuf.checkpointable_object_graph_pb2 import CheckpointableObjectGraph
+from tensorflow.python.training.checkpointable import NoDependency
from tensorflow.python.training.checkpointable_utils import object_metadata
from tensorflow.python.util.all_util import remove_undocumented