singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SINGA-396) Upgrade `protobuf` to 3.6.1 to match Tensorflow's
Date Fri, 25 Jan 2019 16:06:00 GMT

    [ https://issues.apache.org/jira/browse/SINGA-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752382#comment-16752382
] 

ASF subversion and git services commented on SINGA-396:
-------------------------------------------------------

Commit 0d6b1aee195cef31c7be0d3c498875c9ed0abb34 in incubator-singa's branch refs/heads/SINGA-422
from Wang Wei
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=0d6b1ae ]

SINGA-422 ModuleNotFoundError: No module named '_singa_wrap'

I tried to use gcc and gxx 5.4 or 7.3. However, there are various errors due to the mismatch
of gcc/gxx, cuda, protobuf
versions. E.g., `CXXABI_1.3.8' not found, `GLIBCXX_3.4.20' not found.

Now the solution is to rollback the protobuf version to 3.2.0 and gcc to
4.8.5.

Ref. SINGA-396 SINGA409.


> Upgrade `protobuf` to 3.6.1 to match Tensorflow's
> -------------------------------------------------
>
>                 Key: SINGA-396
>                 URL: https://issues.apache.org/jira/browse/SINGA-396
>             Project: Singa
>          Issue Type: Improvement
>          Components: PySINGA
>            Reporter: Ngin Yun Chuan
>            Priority: Minor
>
> `singa-cpu==1.1.1` depends on `protobuf==3.2.0`, but `tensorflow==1.10.1` depends on
`protobuf==3.6.1`. When Tensorflow is installed with Singa on the same image, such an error
occurs when importing `tensorflow`:
> ```
> ...
>   File "/usr/local/envs/rafiki/lib/python3.6/site-packages/tensorflow/__init__.py", line
22, in <module>
>     from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
>   File "/usr/local/envs/rafiki/lib/python3.6/site-packages/tensorflow/python/__init__.py",
line 52, in <module>
>     from tensorflow.core.framework.graph_pb2 import *
>   File "/usr/local/envs/rafiki/lib/python3.6/site-packages/tensorflow/core/framework/graph_pb2.py",
line 15, in <module>
>     from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
>   File "/usr/local/envs/rafiki/lib/python3.6/site-packages/tensorflow/core/framework/node_def_pb2.py",
line 15, in <module>
>     from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
>   File "/usr/local/envs/rafiki/lib/python3.6/site-packages/tensorflow/core/framework/attr_value_pb2.py",
line 15, in <module>
>     from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
>   File "/usr/local/envs/rafiki/lib/python3.6/site-packages/tensorflow/core/framework/tensor_pb2.py",
line 15, in <module>
>     from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
>   File "/usr/local/envs/rafiki/lib/python3.6/site-packages/tensorflow/core/framework/resource_handle_pb2.py",
line 22, in <module>
>     serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01
\x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04
\x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3')
> TypeError: __new__() got an unexpected keyword argument 'serialized_options'
> ```
> This error seems to occur due to an incompatible version of `protobuf`: [https://stackoverflow.com/questions/49463060/python-tensorflow-import-failed]
> Here is a Dockerfile that reproduces the error:
> ```
> FROM ubuntu:16.04
> RUN apt-get update && apt-get -y upgrade
> # Install conda with pip and python 3.6
> RUN apt-get -y install curl bzip2 \
>     && curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-o /tmp/miniconda.sh \
>     && bash /tmp/miniconda.sh -bfp /usr/local \
>     && rm -rf /tmp/miniconda.sh \
>     && conda create -y --name rafiki python=3.6 \
>     && conda clean --all --yes
> ENV PATH /usr/local/envs/rafiki/bin:$PATH
> RUN pip install tensorflow==1.10.1
> RUN conda install --name rafiki -y -c nusdbsystem singa-cpu==1.1.1
> CMD python -c 'import tensorflow'
> ```
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message