diff options
author | 2017-03-03 09:10:25 -0800 | |
---|---|---|
committer | 2017-03-03 09:31:31 -0800 | |
commit | 936e5937220f18591a04c3baa91ad0f5aaacb171 (patch) | |
tree | 58fc43e9417ecfac7c38f1cb610ae72ddde9314a /tensorflow/python/estimator/inputs/queues/feeding_functions.py | |
parent | 2299ffe31d89a7b62d97681f812bddc9b790bf57 (diff) |
Does pandas import check in each caller file directly to avoid flaky tests.
Change: 149118694
Diffstat (limited to 'tensorflow/python/estimator/inputs/queues/feeding_functions.py')
-rw-r--r-- | tensorflow/python/estimator/inputs/queues/feeding_functions.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tensorflow/python/estimator/inputs/queues/feeding_functions.py b/tensorflow/python/estimator/inputs/queues/feeding_functions.py index aa39958559..9da2bce0f8 100644 --- a/tensorflow/python/estimator/inputs/queues/feeding_functions.py +++ b/tensorflow/python/estimator/inputs/queues/feeding_functions.py @@ -22,7 +22,6 @@ import collections import random import numpy as np -from tensorflow.python.estimator.inputs.pandas_import import HAS_PANDAS from tensorflow.python.estimator.inputs.queues import feeding_queue_runner as fqr from tensorflow.python.framework import dtypes from tensorflow.python.framework import errors @@ -34,9 +33,15 @@ from tensorflow.python.platform import tf_logging as logging from tensorflow.python.summary import summary from tensorflow.python.training import queue_runner -if HAS_PANDAS: +try: # pylint: disable=g-import-not-at-top import pandas as pd + HAS_PANDAS = True +except IOError: + # Pandas writes a temporary file during import. If it fails, don't use pandas. + HAS_PANDAS = False +except ImportError: + HAS_PANDAS = False def _get_integer_indices_for_next_batch( |