aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/platform/gfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/platform/gfile.py')
-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..45de047894 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)