aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/platform
diff options
context:
space:
mode:
authorGravatar Andrew Selle <aselle@google.com>2018-07-16 10:13:10 -0700
committerGravatar GitHub <noreply@github.com>2018-07-16 10:13:10 -0700
commitcaae486f919069268ca7ad9dd98a6e53efede4bb (patch)
tree6c0a9c16ff0ea1eabe6ea288b408857e4e250e0f /tensorflow/python/platform
parentb70a39b4e67eeb2b3c2a635f1ef6d4e1c8b0f82a (diff)
Describe that the semantics of gfile are different.
Fixes #19296.
Diffstat (limited to 'tensorflow/python/platform')
-rw-r--r--tensorflow/python/platform/gfile.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/tensorflow/python/platform/gfile.py b/tensorflow/python/platform/gfile.py
index fd697d70bf..cfc50e8223 100644
--- a/tensorflow/python/platform/gfile.py
+++ b/tensorflow/python/platform/gfile.py
@@ -38,7 +38,14 @@ from tensorflow.python.util.tf_export import tf_export
@tf_export('gfile.GFile', 'gfile.Open')
class GFile(_FileIO):
- """File I/O wrappers without thread locking."""
+ """File I/O wrappers without thread locking.
+
+ Note, that this is somewhat like builtin Python file I/O, but
+ there are semantic differences to make it more efficient for
+ some backing filesystems. For example, a write mode file will
+ not be opened until the first write call (to minimize RPC
+ invocations in network filesystems).
+ """
def __init__(self, name, mode='r'):
super(GFile, self).__init__(name=name, mode=mode)
@@ -46,7 +53,14 @@ class GFile(_FileIO):
@tf_export('gfile.FastGFile')
class FastGFile(_FileIO):
- """File I/O wrappers without thread locking."""
+ """File I/O wrappers without thread locking.
+
+ Note, that this is somewhat like builtin Python file I/O, but
+ there are semantic differences to make it more efficient for
+ some backing filesystems. For example, a write mode file will
+ not be opened until the first write call (to minimize RPC
+ invocations in network filesystems).
+ """
def __init__(self, name, mode='r'):
super(FastGFile, self).__init__(name=name, mode=mode)