Closed dkossnick-figma closed 4 years ago
With tensorflow==2.0.0a0, in the data folder I run python cifar_test.py
and get:
(task_adaptation) david@david:~/Code/task_adaptation/task_adaptation/data$ python cifar_test.py
Traceback (most recent call last):
File "cifar_test.py", line 21, in <module>
from task_adaptation.data import cifar
File "/home/david/Code/task_adaptation/task_adaptation/data/cifar.py", line 21, in <module>
import task_adaptation.data.base as base
File "/home/david/Code/task_adaptation/task_adaptation/data/base.py", line 25, in <module>
import tensorflow_datasets as tfds
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/__init__.py", line 46, in <module>
from tensorflow_datasets.core import tf_compat
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/__init__.py", line 30, in <module>
from tensorflow_datasets.core.dataset_info import BeamMetadataDict
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/dataset_info.py", line 54, in <module>
from tensorflow_datasets.core.features import top_level_feature
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/__init__.py", line 27, in <module>
from tensorflow_datasets.core.features.features_dict import FeaturesDict
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/features_dict.py", line 28, in <module>
from tensorflow_datasets.core.features import top_level_feature
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/top_level_feature.py", line 27, in <module>
class TopLevelFeature(feature_lib.FeatureConnector):
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/top_level_feature.py", line 45, in TopLevelFeature
@tf.autograph.experimental.do_not_convert()
AttributeError: 'module' object has no attribute 'do_not_convert'
With tensorflow==1.14.0, when in the data folder I run python cifar_test.py
, I get:
(task_adaptation) david@david:~/Code/task_adaptation/task_adaptation/data$ python cifar_test.py
Traceback (most recent call last):
File "cifar_test.py", line 21, in <module>
from task_adaptation.data import cifar
File "/home/david/Code/task_adaptation/task_adaptation/data/cifar.py", line 21, in <module>
import task_adaptation.data.base as base
File "/home/david/Code/task_adaptation/task_adaptation/data/base.py", line 25, in <module>
import tensorflow_datasets as tfds
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/__init__.py", line 46, in <module>
from tensorflow_datasets.core import tf_compat
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/__init__.py", line 21, in <module>
tf_compat.ensure_tf_install()
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/tf_compat.py", line 66, in ensure_tf_install
_patch_tf(tf)
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/tf_compat.py", line 80, in _patch_tf
_patch_for_tf1_13(tf)
File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/tf_compat.py", line 114, in _patch_for_tf1_13
tf.contrib.autograph.do_not_convert)
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/python/util/lazy_loader.py", line 62, in __getattr__
module = self._load()
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/python/util/lazy_loader.py", line 45, in _load
module = importlib.import_module(self.__name__)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/__init__.py", line 37, in <module>
from tensorflow.contrib import cudnn_rnn
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/__init__.py", line 38, in <module>
from tensorflow.contrib.cudnn_rnn.python.layers import *
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/layers/__init__.py", line 23, in <module>
from tensorflow.contrib.cudnn_rnn.python.layers.cudnn_rnn import *
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/layers/cudnn_rnn.py", line 20, in <module>
from tensorflow.contrib.cudnn_rnn.python.ops import cudnn_rnn_ops
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py", line 22, in <module>
from tensorflow.contrib.rnn.python.ops import lstm_ops
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/rnn/__init__.py", line 93, in <module>
from tensorflow.contrib.rnn.python.ops.rnn_cell import *
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/rnn/python/ops/rnn_cell.py", line 24, in <module>
from tensorflow.contrib.layers.python.layers import layers
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/layers/__init__.py", line 116, in <module>
from tensorflow.contrib.layers.python.layers import *
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/__init__.py", line 33, in <module>
from tensorflow.contrib.layers.python.layers.target_column import *
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/target_column.py", line 24, in <module>
from tensorflow.contrib.losses.python.losses import loss_ops
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/losses/__init__.py", line 25, in <module>
from tensorflow.contrib.losses.python import metric_learning
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/losses/python/metric_learning/__init__.py", line 25, in <module>
from tensorflow.contrib.losses.python.metric_learning.metric_loss_ops import *
File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/losses/python/metric_learning/metric_loss_ops.py", line 34, in <module>
from sklearn import metrics
File "/home/david/.local/lib/python2.7/site-packages/sklearn/metrics/__init__.py", line 7, in <module>
from .ranking import auc
File "/home/david/.local/lib/python2.7/site-packages/sklearn/metrics/ranking.py", line 36, in <module>
from ..preprocessing import label_binarize
File "/home/david/.local/lib/python2.7/site-packages/sklearn/preprocessing/__init__.py", line 6, in <module>
from ._function_transformer import FunctionTransformer
File "/home/david/.local/lib/python2.7/site-packages/sklearn/preprocessing/_function_transformer.py", line 5, in <module>
from ..utils.testing import assert_allclose_dense_sparse
File "/home/david/.local/lib/python2.7/site-packages/sklearn/utils/testing.py", line 751, in <module>
import pytest
File "/usr/lib/python2.7/dist-packages/pytest.py", line 13, in <module>
from _pytest.fixtures import fixture, yield_fixture
File "/usr/lib/python2.7/dist-packages/_pytest/fixtures.py", line 842, in <module>
class FixtureFunctionMarker(object):
File "/usr/lib/python2.7/dist-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker
params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'
I am getting the same errors for all the tests I've tried. Any advice?
Regarding the problem with installation of tensorflow 1.15, I suspect that you are using outdated version of pip. Could you make sure that pip version you are using is 19.3.1 and try again?
Closing due inactivity.
I cloned the repo and am going through the setup steps. I am in a fresh conda environment.
I run
pip install -e .
and get the results:This halted installation, so it never got to datasets or hub, which causes problems. As a workaround, I edited setup.py to reference tensorflow==2.0.0a0 locally and finished setup from that. Not sure if this will bite me later with API compatibility issues.