aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/estimator/inputs/pandas_io.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/estimator/inputs/pandas_io.py')
-rw-r--r--tensorflow/python/estimator/inputs/pandas_io.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/python/estimator/inputs/pandas_io.py b/tensorflow/python/estimator/inputs/pandas_io.py
index 938e244fb3..57f8e5fd6a 100644
--- a/tensorflow/python/estimator/inputs/pandas_io.py
+++ b/tensorflow/python/estimator/inputs/pandas_io.py
@@ -68,15 +68,16 @@ def pandas_input_fn(x,
Raises:
ValueError: if `x` already contains a column with the same name as `y`, or
if the indexes of `x` and `y` don't match.
- TypeError: `shuffle` is not bool.
+ ValueError: if 'shuffle' is not provided or a bool.
"""
if not HAS_PANDAS:
raise TypeError(
'pandas_input_fn should not be called without pandas installed')
if not isinstance(shuffle, bool):
- raise TypeError('shuffle must be explicitly set as boolean; '
- 'got {}'.format(shuffle))
+ raise ValueError('shuffle must be provided and explicitly set as boolean '
+ '(it is recommended to set it as True for training); '
+ 'got {}'.format(shuffle))
x = x.copy()
if y is not None: