conda-forge / conda-forge/tensorflow-feedstock

On tensorflow and incompatible protobuf version

Open
#288 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Shell
Stars
93
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Solution to issue cannot be found in the documentation.
  • I checked the documentation.
Issue

Installing tensorflow-gpu=2.10 results in the protobuf dependency being installed with an incompatible version (4.x; tensorflow is only compatible with 3.x).

Note that installing tensorflow=2.10 (rather than tensorflow-gpu) results in a compatible 3.x protobuf version being installed. Or installing an older version (e.g., tensorflow-gpu=2.8) results in a compatible 3.x protobuf version being installed.

The installation with a (seemingly) incompatible protobuf version actually seems to work somehow, as long as you leave everything as is. But if the tensorflow installation ever gets triggered again for some reason (e.g. in some later step of an installation pipeline), then it will downgrade the protobuf version from 4.x to 3.x, and then the tensorflow installation will be broken.

To reproduce:

conda create -n tmp python=3.9
conda activate tmp
conda install -c conda-forge tensorflow-gpu=2.10
pip install tensorflow
python -c "import tensorflow"
Installed packages
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                  2_kmp_llvm    conda-forge
absl-py                   1.3.0              pyhd8ed1ab_0    conda-forge
aiohttp                   3.8.3            py39hb9d737c_1    conda-forge
aiosignal                 1.3.1              pyhd8ed1ab_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
async-timeout             4.0.2              pyhd8ed1ab_0    conda-forge
attrs                     22.1.0             pyh71513ae_1    conda-forge
blinker                   1.5                pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py39hb9d737c_1005    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2022.9.24            ha878542_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cachetools                5.2.0              pyhd8ed1ab_0    conda-forge
certifi                   2022.9.24          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1           py39he91dace_2    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
click                     8.1.3           unix_pyhd8ed1ab_2    conda-forge
cryptography              38.0.4           py39hd97740a_0    conda-forge
cudatoolkit               11.8.0              h37601d7_11    conda-forge
cudnn                     8.4.1.50             hed8a83a_0    conda-forge
flatbuffers               2.0.7                h27087fc_0    conda-forge
frozenlist                1.3.3            py39hb9d737c_0    conda-forge
gast                      0.4.0              pyh9f0ad1d_0    conda-forge
giflib                    5.2.1                h36c2ea0_2    conda-forge
google-auth               2.15.0             pyh1a96a4e_0    conda-forge
google-auth-oauthlib      0.4.6              pyhd8ed1ab_0    conda-forge
google-pasta              0.2.0              pyh8c360ce_0    conda-forge
grpc-cpp                  1.47.1               h05bd8bd_7    conda-forge
grpcio                    1.47.1           py39h712372c_7    conda-forge
h5py                      3.7.0           nompi_py39h817c9c5_102    conda-forge
hdf5                      1.12.2          nompi_h2386368_100    conda-forge
icu                       70.1                 h27087fc_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
importlib-metadata        5.1.0              pyha770c72_0    conda-forge
jpeg                      9e                   h166bdaf_2    conda-forge
keras                     2.10.0           py39h06a4308_0
keras-preprocessing       1.1.2              pyhd8ed1ab_0    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.19.3               h3790be6_0    conda-forge
ld_impl_linux-64          2.38                 h1181459_1
libabseil                 20220623.0      cxx17_h48a1fff_5    conda-forge
libblas                   3.9.0           16_linux64_openblas    conda-forge
libcblas                  3.9.0           16_linux64_openblas    conda-forge
libcurl                   7.86.0               h7bff187_1    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.4.2                h6a678d5_6
libgcc-ng                 12.2.0              h65d4601_19    conda-forge
libgfortran-ng            12.2.0              h69a702a_19    conda-forge
libgfortran5              12.2.0              h337968e_19    conda-forge
liblapack                 3.9.0           16_linux64_openblas    conda-forge
libnghttp2                1.47.0               hdcd2b5c_1    conda-forge
libopenblas               0.3.21          pthreads_h78a6416_3    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libprotobuf               3.21.10              h6239696_0    conda-forge
libsqlite                 3.40.0               h753d276_0    conda-forge
libssh2                   1.10.0               haa6b8db_3    conda-forge
libstdcxx-ng              12.2.0              h46fd767_19    conda-forge
libzlib                   1.2.13               h166bdaf_4    conda-forge
llvm-openmp               15.0.6               he0ac6c6_0    conda-forge
markdown                  3.4.1              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.1            py39hb9d737c_2    conda-forge
multidict                 6.0.2            py39hb9d737c_2    conda-forge
nccl                      2.14.3.1             h0800d71_0    conda-forge
ncurses                   6.3                  h5eee18b_3
numpy                     1.23.5           py39h3d75532_0    conda-forge
oauthlib                  3.2.2              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1s               h0b41bf4_1    conda-forge
opt_einsum                3.3.0              pyhd8ed1ab_1    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pip                       22.2.2           py39h06a4308_0
protobuf                  4.21.10          py39h5a03fae_0    conda-forge
pyasn1                    0.4.8                      py_0    conda-forge
pyasn1-modules            0.2.7                      py_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyjwt                     2.6.0              pyhd8ed1ab_0    conda-forge
pyopenssl                 22.1.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.9.15               h7a1cb2a_2
python-flatbuffers        2.0                pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pyu2f                     0.1.5              pyhd8ed1ab_0    conda-forge
re2                       2022.06.01           h27087fc_1    conda-forge
readline                  8.2                  h5eee18b_0
requests                  2.28.1             pyhd8ed1ab_1    conda-forge
requests-oauthlib         1.3.1              pyhd8ed1ab_0    conda-forge
rsa                       4.9                pyhd8ed1ab_0    conda-forge
scipy                     1.9.3            py39hddc5342_2    conda-forge
setuptools                65.5.0           py39h06a4308_0
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.9                hbd366e4_2    conda-forge
sqlite                    3.40.0               h5082296_0
tensorboard               2.10.0           py39h06a4308_0
tensorboard-data-server   0.6.1            py39hd97740a_4    conda-forge
tensorboard-plugin-wit    1.8.1              pyhd8ed1ab_0    conda-forge
tensorflow                2.10.0          cuda112py39h01bd6f0_0    conda-forge
tensorflow-base           2.10.0          cuda112py39h2957820_0    conda-forge
tensorflow-estimator      2.10.0          cuda112py39hd320b7a_0    conda-forge
tensorflow-gpu            2.10.0          cuda112py39h0bbbad9_0    conda-forge
termcolor                 2.1.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h1ccaba5_0
typing-extensions         4.4.0                hd8ed1ab_0    conda-forge
typing_extensions         4.4.0              pyha770c72_0    conda-forge
tzdata                    2022f                h04d1e81_0
urllib3                   1.26.13            pyhd8ed1ab_0    conda-forge
werkzeug                  2.2.2              pyhd8ed1ab_0    conda-forge
wheel                     0.37.1             pyhd3eb1b0_0
wrapt                     1.14.1           py39hb9d737c_1    conda-forge
xz                        5.2.8                h5eee18b_0
yarl                      1.8.1            py39hb9d737c_0    conda-forge
zipp                      3.11.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               h166bdaf_4    conda-forge
Environment info
active environment : tmp
    active env location : /home/drasmuss/miniconda3/envs/tmp
            shell level : 2
       user config file : /home/drasmuss/.condarc
 populated config files :
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.5.final.0
       virtual packages : __cuda=12.0=0
                          __linux=5.15.74.2=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/drasmuss/miniconda3  (writable)
      conda av data dir : /home/drasmuss/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/drasmuss/miniconda3/pkgs
                          /home/drasmuss/.conda/pkgs
       envs directories : /home/drasmuss/miniconda3/envs
                          /home/drasmuss/.conda/envs
               platform : linux-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.5 Linux/5.15.74.2-microsoft-standard-WSL2 ubuntu/20.04.5 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conda create and tensorflow-gpu=2.10 installation commands from the issue, then inspect the tensorflow-gpu 2.10 package dependency metadata and protobuf resolution. Done means the environment selects a TensorFlow-compatible protobuf version and remains consistent when TensorFlow installation is triggered again.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.