-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot update pmml-android from 1.3.6 to 1.4.15 due to jackson dependency #23
Comments
The JPMML-Android project is obsolete today, because you can distribute PMML models in the JSON data format (instead of the default XML data format), or transpile them to 100% Java bytecode using the JPMML-Transpiler library. I really should do a technical post about it one day.
Identify which JPMML library is bringing in the Jackson transitive dependency (eg. using <dependency>
<groupId>..</groupId>
<artifactId>..</artifactId>
<exclusions>
<exclusion>
<groupId>org.jpmml</groupId>
<artifactId>pmml-model-jackson</artifactId>
</exclusion>
</exclusions>
</dependency> |
I ran into exactly the same issue today, when pushing out new commits to the 1.5-SNAPSHOT development branch: Turns out that some Maven repositories contain an incomplete Jackson Here's my code change: |
Thanks your help. I'm trying to use jpmml-transpiler to load the pmml file into my Android App. But I cannot translate it to ModelEvaluator successfully. Here is the example of my code: val inputStream = context!!.assets.open("model.pmml")
val xmlPmml = PMMLUtil.unmarshal(inputStream)
val jCodeModel = TranspilerUtil.translate(xmlPmml, "com.example.PMMLModel")
val javaPmml = PMMLUtil.load(jCodeModel.javaClass.classLoader)
clf = ModelEvaluatorBuilder(javaPmml).build()
clf?.verify() It shows error:
I saw the usage in JPMML-Transpiler, and it said loading xmllmml first and then write to file and read from file and using URLClassLoader to load to javaPmml. It seems to be a little complicated for my application. I just want to load model.pmml in the Android device and make the correct ModelEvaluator to predict. What's the best solution for me? |
In principle, you need to split your workflow into two pieces. The first three lines must be executed in an environment that provides JAXB functionality (Android doesn't):
Dump the above The second piece - loading a transpiled |
I try to update pmml-android from 1.3.6 to 1.4.15. But it cannot run
mvn clean install
successfully. It shows the following errors:How can I solve this issue?
The text was updated successfully, but these errors were encountered: