Closed 183amir closed 2 years ago
It's also broken in conda-forge's docker image:
sudo docker run --rm -it quay.io/condaforge/linux-anvil-comp7
[conda@339fecdfe740 ~]$ cd
[conda@339fecdfe740 ~]$ pwd
/home/conda
[conda@339fecdfe740 ~]$ conda create -n tf26 python=3.8 tensorflow
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /opt/conda/envs/tf26
added / updated specs:
- python=3.8
- tensorflow
The following packages will be downloaded:
package | build
---------------------------|-----------------
abseil-cpp-20210324.2 | h9c3ff4c_0 1010 KB conda-forge
absl-py-0.14.1 | pyhd8ed1ab_0 98 KB conda-forge
aiohttp-3.7.4.post0 | py38h497a2fe_0 641 KB conda-forge
astor-0.8.1 | pyh9f0ad1d_0 25 KB conda-forge
astunparse-1.6.3 | pyhd8ed1ab_0 15 KB conda-forge
async-timeout-3.0.1 | py_1000 11 KB conda-forge
blinker-1.4 | py_1 13 KB conda-forge
cached-property-1.5.2 | hd8ed1ab_1 4 KB conda-forge
cached_property-1.5.2 | pyha770c72_1 11 KB conda-forge
cachetools-4.2.4 | pyhd8ed1ab_0 12 KB conda-forge
click-8.0.1 | py38h578d9bd_0 146 KB conda-forge
dataclasses-0.8 | pyhc8e2a94_3 10 KB conda-forge
gast-0.4.0 | pyh9f0ad1d_0 12 KB conda-forge
giflib-5.2.1 | h36c2ea0_2 77 KB conda-forge
google-auth-1.35.0 | pyh6c4a22f_0 81 KB conda-forge
google-auth-oauthlib-0.4.6 | pyhd8ed1ab_0 19 KB conda-forge
google-pasta-0.2.0 | pyh8c360ce_0 42 KB conda-forge
grpc-cpp-1.37.1 | hfc4d69e_3 3.5 MB conda-forge
grpcio-1.37.1 | py38hdd6454d_0 2.2 MB conda-forge
h5py-3.1.0 |nompi_py38hafa665b_100 1.2 MB conda-forge
hdf5-1.10.6 |nompi_h6a2412b_1114 3.1 MB conda-forge
jpeg-9d | h36c2ea0_0 264 KB conda-forge
keras-2.6.0 | pyhd8ed1ab_0 822 KB conda-forge
keras-preprocessing-1.1.2 | pyhd8ed1ab_0 34 KB conda-forge
krb5-1.19.2 | hcc1bbae_2 1.4 MB conda-forge
libblas-3.9.0 |11_linux64_openblas 12 KB conda-forge
libcblas-3.9.0 |11_linux64_openblas 11 KB conda-forge
libcurl-7.79.1 | h2574ce0_1 335 KB conda-forge
libffi-3.4.2 | h9c3ff4c_4 57 KB conda-forge
libgcc-ng-11.2.0 | h1d223b6_9 889 KB conda-forge
libgfortran-ng-11.2.0 | h69a702a_9 19 KB conda-forge
libgfortran5-11.2.0 | h5c6108e_9 1.7 MB conda-forge
libgomp-11.2.0 | h1d223b6_9 428 KB conda-forge
liblapack-3.9.0 |11_linux64_openblas 11 KB conda-forge
libnghttp2-1.43.0 | h812cca2_1 790 KB conda-forge
libopenblas-0.3.17 |pthreads_h8fe5266_1 9.2 MB conda-forge
libpng-1.6.37 | h21135ba_2 306 KB conda-forge
libprotobuf-3.15.8 | h780b84a_1 2.5 MB conda-forge
libssh2-1.10.0 | ha56f1ee_2 233 KB conda-forge
libstdcxx-ng-11.2.0 | he4da1e4_9 4.2 MB conda-forge
libzlib-1.2.11 | h36c2ea0_1013 59 KB conda-forge
markdown-3.3.4 | pyhd8ed1ab_0 67 KB conda-forge
multidict-5.2.0 | py38h497a2fe_0 64 KB conda-forge
numpy-1.19.5 | py38h9894fe3_2 5.3 MB conda-forge
oauthlib-3.1.1 | pyhd8ed1ab_0 87 KB conda-forge
opt_einsum-3.3.0 | pyhd8ed1ab_1 53 KB conda-forge
protobuf-3.15.8 | py38h709712a_0 341 KB conda-forge
pyasn1-0.4.8 | py_0 53 KB conda-forge
pyasn1-modules-0.2.7 | py_0 60 KB conda-forge
pyjwt-2.1.0 | pyhd8ed1ab_0 17 KB conda-forge
pyopenssl-21.0.0 | pyhd8ed1ab_0 48 KB conda-forge
python-3.8.12 |hb7a2778_1_cpython 26.2 MB conda-forge
python-flatbuffers-1.12 | pyhd8ed1ab_1 19 KB conda-forge
python_abi-3.8 | 2_cp38 4 KB conda-forge
pyu2f-0.1.5 | pyhd8ed1ab_0 31 KB conda-forge
re2-2021.08.01 | h9c3ff4c_0 220 KB conda-forge
requests-oauthlib-1.3.0 | pyh9f0ad1d_0 21 KB conda-forge
rsa-4.7.2 | pyh44b312d_0 28 KB conda-forge
scipy-1.7.1 | py38h56a6a73_0 21.9 MB conda-forge
setuptools-58.2.0 | py38h578d9bd_0 1.0 MB conda-forge
six-1.15.0 | pyh9f0ad1d_0 14 KB conda-forge
snappy-1.1.8 | he1b5a44_3 32 KB conda-forge
sqlite-3.36.0 | h9cd32fc_2 1.4 MB conda-forge
tensorboard-2.6.0 | pyhd8ed1ab_1 5.0 MB conda-forge
tensorboard-data-server-0.6.0| py38h3e25421_0 3.3 MB conda-forge
tensorboard-plugin-wit-1.8.0| pyh44b312d_0 670 KB conda-forge
tensorflow-2.6.0 | py38h578d9bd_0 23 KB conda-forge
tensorflow-base-2.6.0 | py38h83f5f1d_0 111.0 MB conda-forge
tensorflow-estimator-2.6.0 | py38h709712a_0 651 KB conda-forge
termcolor-1.1.0 | py_2 6 KB conda-forge
typing-extensions-3.7.4.3 | 0 8 KB conda-forge
typing_extensions-3.7.4.3 | py_0 25 KB conda-forge
urllib3-1.26.7 | pyhd8ed1ab_0 100 KB conda-forge
werkzeug-2.0.1 | pyhd8ed1ab_0 219 KB conda-forge
wrapt-1.12.1 | py38h497a2fe_3 47 KB conda-forge
yarl-1.6.3 | py38h497a2fe_2 143 KB conda-forge
zipp-3.6.0 | pyhd8ed1ab_0 12 KB conda-forge
zlib-1.2.11 | h36c2ea0_1013 86 KB conda-forge
------------------------------------------------------------
Total: 213.6 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
_openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-1_gnu
abseil-cpp conda-forge/linux-64::abseil-cpp-20210324.2-h9c3ff4c_0
absl-py conda-forge/noarch::absl-py-0.14.1-pyhd8ed1ab_0
aiohttp conda-forge/linux-64::aiohttp-3.7.4.post0-py38h497a2fe_0
astor conda-forge/noarch::astor-0.8.1-pyh9f0ad1d_0
astunparse conda-forge/noarch::astunparse-1.6.3-pyhd8ed1ab_0
async-timeout conda-forge/noarch::async-timeout-3.0.1-py_1000
attrs conda-forge/noarch::attrs-21.2.0-pyhd8ed1ab_0
blinker conda-forge/noarch::blinker-1.4-py_1
brotlipy conda-forge/linux-64::brotlipy-0.7.0-py38h497a2fe_1001
c-ares conda-forge/linux-64::c-ares-1.17.2-h7f98852_0
ca-certificates conda-forge/linux-64::ca-certificates-2021.5.30-ha878542_0
cached-property conda-forge/noarch::cached-property-1.5.2-hd8ed1ab_1
cached_property conda-forge/noarch::cached_property-1.5.2-pyha770c72_1
cachetools conda-forge/noarch::cachetools-4.2.4-pyhd8ed1ab_0
certifi conda-forge/linux-64::certifi-2021.5.30-py38h578d9bd_0
cffi conda-forge/linux-64::cffi-1.14.6-py38h3931269_1
chardet conda-forge/linux-64::chardet-4.0.0-py38h578d9bd_1
charset-normalizer conda-forge/noarch::charset-normalizer-2.0.0-pyhd8ed1ab_0
click conda-forge/linux-64::click-8.0.1-py38h578d9bd_0
cryptography conda-forge/linux-64::cryptography-3.4.7-py38ha5dfef3_0
dataclasses conda-forge/noarch::dataclasses-0.8-pyhc8e2a94_3
gast conda-forge/noarch::gast-0.4.0-pyh9f0ad1d_0
giflib conda-forge/linux-64::giflib-5.2.1-h36c2ea0_2
google-auth conda-forge/noarch::google-auth-1.35.0-pyh6c4a22f_0
google-auth-oauth~ conda-forge/noarch::google-auth-oauthlib-0.4.6-pyhd8ed1ab_0
google-pasta conda-forge/noarch::google-pasta-0.2.0-pyh8c360ce_0
grpc-cpp conda-forge/linux-64::grpc-cpp-1.37.1-hfc4d69e_3
grpcio conda-forge/linux-64::grpcio-1.37.1-py38hdd6454d_0
h5py conda-forge/linux-64::h5py-3.1.0-nompi_py38hafa665b_100
hdf5 conda-forge/linux-64::hdf5-1.10.6-nompi_h6a2412b_1114
icu conda-forge/linux-64::icu-68.1-h58526e2_0
idna conda-forge/noarch::idna-3.1-pyhd3deb0d_0
importlib-metadata conda-forge/linux-64::importlib-metadata-4.8.1-py38h578d9bd_0
jpeg conda-forge/linux-64::jpeg-9d-h36c2ea0_0
keras conda-forge/noarch::keras-2.6.0-pyhd8ed1ab_0
keras-preprocessi~ conda-forge/noarch::keras-preprocessing-1.1.2-pyhd8ed1ab_0
krb5 conda-forge/linux-64::krb5-1.19.2-hcc1bbae_2
ld_impl_linux-64 conda-forge/linux-64::ld_impl_linux-64-2.36.1-hea4e1c9_2
libblas conda-forge/linux-64::libblas-3.9.0-11_linux64_openblas
libcblas conda-forge/linux-64::libcblas-3.9.0-11_linux64_openblas
libcurl conda-forge/linux-64::libcurl-7.79.1-h2574ce0_1
libedit conda-forge/linux-64::libedit-3.1.20191231-he28a2e2_2
libev conda-forge/linux-64::libev-4.33-h516909a_1
libffi conda-forge/linux-64::libffi-3.4.2-h9c3ff4c_4
libgcc-ng conda-forge/linux-64::libgcc-ng-11.2.0-h1d223b6_9
libgfortran-ng conda-forge/linux-64::libgfortran-ng-11.2.0-h69a702a_9
libgfortran5 conda-forge/linux-64::libgfortran5-11.2.0-h5c6108e_9
libgomp conda-forge/linux-64::libgomp-11.2.0-h1d223b6_9
liblapack conda-forge/linux-64::liblapack-3.9.0-11_linux64_openblas
libnghttp2 conda-forge/linux-64::libnghttp2-1.43.0-h812cca2_1
libopenblas conda-forge/linux-64::libopenblas-0.3.17-pthreads_h8fe5266_1
libpng conda-forge/linux-64::libpng-1.6.37-h21135ba_2
libprotobuf conda-forge/linux-64::libprotobuf-3.15.8-h780b84a_1
libssh2 conda-forge/linux-64::libssh2-1.10.0-ha56f1ee_2
libstdcxx-ng conda-forge/linux-64::libstdcxx-ng-11.2.0-he4da1e4_9
libzlib conda-forge/linux-64::libzlib-1.2.11-h36c2ea0_1013
markdown conda-forge/noarch::markdown-3.3.4-pyhd8ed1ab_0
multidict conda-forge/linux-64::multidict-5.2.0-py38h497a2fe_0
ncurses conda-forge/linux-64::ncurses-6.2-h58526e2_4
numpy conda-forge/linux-64::numpy-1.19.5-py38h9894fe3_2
oauthlib conda-forge/noarch::oauthlib-3.1.1-pyhd8ed1ab_0
openssl conda-forge/linux-64::openssl-1.1.1l-h7f98852_0
opt_einsum conda-forge/noarch::opt_einsum-3.3.0-pyhd8ed1ab_1
pip conda-forge/noarch::pip-21.2.4-pyhd8ed1ab_0
protobuf conda-forge/linux-64::protobuf-3.15.8-py38h709712a_0
pyasn1 conda-forge/noarch::pyasn1-0.4.8-py_0
pyasn1-modules conda-forge/noarch::pyasn1-modules-0.2.7-py_0
pycparser conda-forge/noarch::pycparser-2.20-pyh9f0ad1d_2
pyjwt conda-forge/noarch::pyjwt-2.1.0-pyhd8ed1ab_0
pyopenssl conda-forge/noarch::pyopenssl-21.0.0-pyhd8ed1ab_0
pysocks conda-forge/linux-64::pysocks-1.7.1-py38h578d9bd_3
python conda-forge/linux-64::python-3.8.12-hb7a2778_1_cpython
python-flatbuffers conda-forge/noarch::python-flatbuffers-1.12-pyhd8ed1ab_1
python_abi conda-forge/linux-64::python_abi-3.8-2_cp38
pyu2f conda-forge/noarch::pyu2f-0.1.5-pyhd8ed1ab_0
re2 conda-forge/linux-64::re2-2021.08.01-h9c3ff4c_0
readline conda-forge/linux-64::readline-8.1-h46c0cb4_0
requests conda-forge/noarch::requests-2.26.0-pyhd8ed1ab_0
requests-oauthlib conda-forge/noarch::requests-oauthlib-1.3.0-pyh9f0ad1d_0
rsa conda-forge/noarch::rsa-4.7.2-pyh44b312d_0
scipy conda-forge/linux-64::scipy-1.7.1-py38h56a6a73_0
setuptools conda-forge/linux-64::setuptools-58.2.0-py38h578d9bd_0
six conda-forge/noarch::six-1.15.0-pyh9f0ad1d_0
snappy conda-forge/linux-64::snappy-1.1.8-he1b5a44_3
sqlite conda-forge/linux-64::sqlite-3.36.0-h9cd32fc_2
tensorboard conda-forge/noarch::tensorboard-2.6.0-pyhd8ed1ab_1
tensorboard-data-~ conda-forge/linux-64::tensorboard-data-server-0.6.0-py38h3e25421_0
tensorboard-plugi~ conda-forge/noarch::tensorboard-plugin-wit-1.8.0-pyh44b312d_0
tensorflow conda-forge/linux-64::tensorflow-2.6.0-py38h578d9bd_0
tensorflow-base conda-forge/linux-64::tensorflow-base-2.6.0-py38h83f5f1d_0
tensorflow-estima~ conda-forge/linux-64::tensorflow-estimator-2.6.0-py38h709712a_0
termcolor conda-forge/noarch::termcolor-1.1.0-py_2
tk conda-forge/linux-64::tk-8.6.11-h27826a3_1
typing-extensions conda-forge/noarch::typing-extensions-3.7.4.3-0
typing_extensions conda-forge/noarch::typing_extensions-3.7.4.3-py_0
urllib3 conda-forge/noarch::urllib3-1.26.7-pyhd8ed1ab_0
werkzeug conda-forge/noarch::werkzeug-2.0.1-pyhd8ed1ab_0
wheel conda-forge/noarch::wheel-0.37.0-pyhd8ed1ab_1
wrapt conda-forge/linux-64::wrapt-1.12.1-py38h497a2fe_3
xz conda-forge/linux-64::xz-5.2.5-h516909a_1
yarl conda-forge/linux-64::yarl-1.6.3-py38h497a2fe_2
zipp conda-forge/noarch::zipp-3.6.0-pyhd8ed1ab_0
zlib conda-forge/linux-64::zlib-1.2.11-h36c2ea0_1013
Proceed ([y]/n)? y
Downloading and Extracting Packages
...
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate tf26
#
# To deactivate an active environment, use
#
# $ conda deactivate
[conda@339fecdfe740 ~]$ conda activate tf26
(tf26) [conda@339fecdfe740 ~]$ python
Python 3.8.12 | packaged by conda-forge | (default, Sep 29 2021, 19:52:28)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> mnist = tf.keras.datasets.mnist
>>>
>>> (x_train, y_train),(x_test, y_test) = mnist.load_data()
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz
11493376/11490434 [==============================] - 1s 0us/step
11501568/11490434 [==============================] - 1s 0us/step
>>> x_train, x_test = x_train / 255.0, x_test / 255.0
>>>
>>> model = tf.keras.models.Sequential([
... tf.keras.layers.Flatten(input_shape=(28, 28)),
... tf.keras.layers.Dense(128, activation='relu'),
... tf.keras.layers.Dropout(0.2),
... tf.keras.layers.Dense(10, activation='softmax')
... ])
2021-10-07 16:08:39.079675: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 530, in _method_wrapper
result = method(self, *args, **kwargs)
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/keras/engine/sequential.py", line 107, in __init__
super(functional.Functional, self).__init__( # pylint: disable=bad-super-call
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 530, in _method_wrapper
result = method(self, *args, **kwargs)
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/keras/engine/training.py", line 289, in __init__
self._init_batch_counters()
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 530, in _method_wrapper
result = method(self, *args, **kwargs)
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/keras/engine/training.py", line 297, in _init_batch_counters
self._train_counter = tf.Variable(0, dtype='int64', aggregation=agg)
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/variables.py", line 268, in __call__
return cls._variable_v2_call(*args, **kwargs)
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/variables.py", line 250, in _variable_v2_call
return previous_getter(
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/variables.py", line 243, in <lambda>
previous_getter = lambda **kws: default_variable_creator_v2(None, **kws)
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/variable_scope.py", line 2662, in default_variable_creator_v2
return resource_variable_ops.ResourceVariable(
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/variables.py", line 270, in __call__
return super(VariableMetaclass, cls).__call__(*args, **kwargs)
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 1602, in __init__
self._init_from_args(
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 1756, in _init_from_args
handle = eager_safe_variable_handle(
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 238, in eager_safe_variable_handle
return _variable_handle_from_shape_and_dtype(shape, dtype, shared_name, name,
File "/opt/conda/envs/tf26/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 178, in _variable_handle_from_shape_and_dtype
cpp_shape_inference_pb2.CppShapeInferenceResult.HandleShapeAndType(
TypeError: Parameter to MergeFrom() must be instance of same class: expected tensorflow.TensorShapeProto got tensorflow.TensorShapeProto.
>>>
confirmed, they are broken for me too.
Could this be related to some protobuf version? I am seeing a post with the same issue here: https://deeptalk.lambdalabs.com/t/cant-build-keras-model-after-tensorflow-update-from-2-2-to-2-3/1799
I added the test specified above to the build process in https://github.com/conda-forge/tensorflow-feedstock/pull/142
Hopefully this solves things
Seems like a protobuf issue: https://deeptalk.lambdalabs.com/t/cant-build-keras-model-after-tensorflow-update-from-2-2-to-2-3/1799
But I can't tell where we are diverging.
I can confirm that the 2.4 packages work.
Oddly. this patch fixes things: https://github.com/tensorflow/tensorflow/pull/51450/files
Described in Gentoo https://bugs.gentoo.org/806541
For those that need the fix today, ^^^ I tested this by just modifying the aforementioned __init__.py
file
The builds should soon be finished!
I am testing a simple TensorFlow program taken from the website but looks like the packages are broken. I have tested on linux-64 python 3.8 and 3.9: