Closed rikvdkleij closed 6 years ago
Solved it by building tensorflow from sources and putting the shared libraries in LD_LIBRARY_PATH. Is this problem caused by different/incompatible protobuffer versions?
@rikvdkleij I haven't seen this error before. Could you please send me your build.sbt
file and the minimal Scala file that causes this? Thanks! :)
I had this issue in a large project with a lot of dependencies. A simple project with no other dependencies just works, so I suspect this problem is caused by multiple protobuf libraries on the classpath.
I will continue Monday and let you know.
Btw, it was not really solved by using TF which was build from sources. It was just working "by accident" 😄
Okay, the problem is caused by the BigDL library but I do not understand why... When I remove this dependency it works.
I have tried to exclude
dependencies but it does not help. I expected another protobuf version on the classpath.
@rikvdkleij Thanks for digging into this! I assume that BigDL is pulling in some other version of protobuf as you say. It may be that one of its dependencies is pulling a difference version of org.tensorflow.proto
. I'm not sure. When you include the BigDL dependency, what is there version of the protobuf library that it pulls?
@eaplatanios BigDL does not depends on org.tensorflow.proto
. I also see only version, 1.5.0
.
@rikvdkleij What about com.google.protobuf
which org.tensorflow.proto
depends on?
That is the protobuf
library I already mentioned. When I make sure there is only one version in the dependency tree, the problem still occurs.
Found the cause, BigDL has shaded the protobuf
library.
@rikvdkleij Thanks a lot for digging into this! How do you resolve the issue in this case? Do you add a separate explicit dependency on the protobuf
library?
No, I did not solve this problem. I only found the cause. I will leave it for later when I'm know for sure I want to use those 2 libraries in one project. I think the only solution is to fork/clone the BigDL project and rebuild it without protobuf
.
Do you add a separate explicit dependency on the protobuf library?
That does not help.
@rikvdkleij I just looked into this and I believe that we can't really do much about this in our side. jIt's weird they use the same package names for org.tensorflow.framework
even though they don't keep them updated (theirs are now 9 months old). I'm wondering if there is way to specify priorities in the dependencies in SBT so that our dependency overrides their classes. I'm phrasing this a bit awkwardly but I hope this makes sense. :)
The only "solution" I saw was to do something like which is described here: https://stackoverflow.com/questions/7819066/sbt-exclude-class-from-jar
I'm running the MNIST example and getting this error:
I have installed protobuffer 3.5:
Using 0.1.2-snapshot version and OSX.
Any idea how I can solve this?