jpmml / jpmml-tensorflow

Java library and command-line application for converting TensorFlow models to PMML
GNU Affero General Public License v3.0
75 stars 27 forks source link

Cannot compile jar #2

Closed JaneLe closed 7 years ago

JaneLe commented 7 years ago

Hi, I tried to compile on my windows and my Linux server but I have the argument mismatch issue. I use win32 version or protocol buffer 3.3.0. Can anyone help to get me the compiled file please?

Thank you.

vruusmann commented 7 years ago

I have the argument mismatch issue.

What is the exact problem (console output, exception with full stack trace)?

It's very hard to suggest fixes, if the issue report only states "the build doesn't work".

JaneLe commented 7 years ago

jpmml Here is the snippet of the Error I get on both systems

vruusmann commented 7 years ago

Here is the snippet of the Error I get on both systems

Thanks - that's relevant and actionable information.

The JPMML-TensorFlow project depends on ProtoBuf 3.2 and TensorFlow 1.1. There are newer versions of both dependencies available already (ie. ProtoBuf 3.3 and TensorFlow 1.2).

I haven't investigates if these dependencies can be updated independently or not. You may try to upgrade the com.google.protobuf:protobuf-java and/or org.tensorflow:tensorflow dependencies to match the setup of your computer - it should result in compilable code.

I'm delaying the upgrade of dependencies until I've had time to implement support for more TensorFlow feature and model types.

vruusmann commented 7 years ago

You may try to upgrade the com.google.protobuf:protobuf-java and/or org.tensorflow:tensorflow dependencies

Apply your tweaks here https://github.com/jpmml/jpmml-tensorflow/blob/master/pom.xml#L53 https://github.com/jpmml/jpmml-tensorflow/blob/master/pom.xml#L94

JaneLe commented 7 years ago

I changeddependency in pom to my protoc which is 3.3.0 and tensorflow to 1.2.1, there is new error:

Results :

Tests in error: DNNClassifierTest.evaluateAudit:32->IntegrationTest.evaluate:36->IntegrationTest.evaluate:50->BatchTest.evaluate:43 » UnsatisfiedLink DNNClassifierTest.evaluateIris:37->IntegrationTest.evaluate:36->IntegrationTest.evaluate:50->BatchTest.evaluate:43 » NoClassDefFound DNNRegressorTest.evaluateAuto:32->IntegrationTest.evaluate:36->IntegrationTest.evaluate:50->BatchTest.evaluate:43 » NoClassDefFound LinearClassifierTest.evaluateAudit:32->IntegrationTest.evaluate:36->IntegrationTest.evaluate:50->BatchTest.evaluate:43 » NoClassDefFound LinearClassifierTest.evaluateIris:37->IntegrationTest.evaluate:36->IntegrationTest.evaluate:50->BatchTest.evaluate:43 » NoClassDefFound LinearRegressorTest.evaluateAuto:31->IntegrationTest.evaluate:36->IntegrationTest.evaluate:50->BatchTest.evaluate:43 » NoClassDefFound

Tests run: 6, Failures: 0, Errors: 6, Skipped: 0

Are these because of the new tensorflow version is not supported yet?

vruusmann commented 7 years ago

DNNClassifierTest.evaluateAudit:32->IntegrationTest.evaluate:36->IntegrationTest.evaluate:50 BatchTest.evaluate:43 » UnsatisfiedLink

JPMML-Tensorflow integration tests fail to run, because Java cannot load some required ProtoBuf or TensorFlow native library. The error message of your java.lang.UnsatifsfiedLinkError should provide the name of the problematic native library. Once you have it, then proceed to StackOverflow for futher troubleshooting advice (as it's not a JPMML-TensorFlow problem anymore).

Are these because of the new tensorflow version is not supported yet?

If you managed to compile Java source code files, then your TensorFlow version should be supported.

Alternatively, you may skip JPMML-TensorFlow integration tests:

mvn -Dmaven.test.skip=true clean install

This will give you a JAR file (untested), but I don't think you'll be able to use it if you don't fix the above native library loading error first.