diff options
author | Derek Murray <mrry@google.com> | 2018-10-01 16:45:11 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-01 16:50:05 -0700 |
commit | b72265dc002e712fc3d0f33434f13c7a36a484b2 (patch) | |
tree | f92d1f23c329654772f95d93f5cf4458741b72df /tensorflow/python/BUILD | |
parent | bb1f9e1a57c8bc18325b3c86298be96e6647a0a3 (diff) |
[tf.data] Deprecate `tf.contrib.data` and introduce `tf.data.experimental` to replace it.
This change prepares `tf.data` for TensorFlow 2.0, where `tf.contrib` will no longer exist. It retains the pre-existing endpoints in `tf.contrib.data` with deprecation warnings.
Note there are some exceptions to the move:
* Deprecated symbols in `tf.contrib.data` have not been moved to `tf.data.experimental`, because replacements already exist.
* `tf.contrib.data.LMDBDataset` has not been moved, because we plan to move it to a SIG-maintained repository.
* `tf.contrib.data.assert_element_shape()` has not yet been moved, because it depends on functionality in `tf.contrib`, and it will move in a later change.
* `tf.contrib.data.AUTOTUNE` has not yet been moved, because we have not yet determined how to `tf_export()` a Python integer.
* The stats-related API endpoints have not yet appeared in a released version of TensorFlow, so these are moved to `tf.data.experimental` without retaining an endpoint in `tf.contrib.data`.
In addition, this change includes some build rule and ApiDef refactoring:
* Some of the "//third_party/tensorflow/python:training" dependencies had to be split in order to avoid a circular dependency.
* The `tf.contrib.stateless` ops now have a private core library for the generated wrappers (and accordingly are hidden in their ApiDef) so that `tf.data.experimental.sample_from_datasets()` can depend on them.
PiperOrigin-RevId: 215304249
Diffstat (limited to 'tensorflow/python/BUILD')
-rw-r--r-- | tensorflow/python/BUILD | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index 9275ad767e..fe81254ef7 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -1740,6 +1740,14 @@ tf_gen_op_wrapper_private_py( ) tf_gen_op_wrapper_private_py( + name = "stateless_random_ops_gen", + visibility = [ + "//tensorflow/contrib/stateless:__pkg__", + "//tensorflow/python/data/experimental/ops:__pkg__", + ], +) + +tf_gen_op_wrapper_private_py( name = "list_ops_gen", ) @@ -3302,9 +3310,11 @@ py_library( "training/checkpointable/**/*.py", # The following targets have their own build rules (same name as the # file): + "training/basic_session_run_hooks.py", "training/checkpoint_management.py", "training/saveable_object.py", "training/saver.py", + "training/session_run_hook.py", "training/training_util.py", ], ), @@ -3312,6 +3322,7 @@ py_library( deps = [ ":array_ops", ":array_ops_gen", + ":basic_session_run_hooks", ":checkpoint_management", ":checkpoint_ops_gen", ":client", @@ -3336,6 +3347,7 @@ py_library( ":saver", ":sdca_ops", ":session", + ":session_run_hook", ":sparse_ops", ":sparse_tensor", ":state_ops", @@ -3380,6 +3392,28 @@ py_library( ) py_library( + name = "session_run_hook", + srcs = ["training/session_run_hook.py"], + srcs_version = "PY2AND3", + deps = [":util"], +) + +py_library( + name = "basic_session_run_hooks", + srcs = ["training/basic_session_run_hooks.py"], + srcs_version = "PY2AND3", + deps = [ + ":client", + ":framework", + ":platform", + ":protos_all_py", + ":session_run_hook", + ":training_util", + ":util", + ], +) + +py_library( name = "saver", srcs = ["training/saver.py"], srcs_version = "PY2AND3", |