-
Notifications
You must be signed in to change notification settings - Fork 256
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
Compatibility with GraalVM #255
Comments
I have zero working experience with GraalVM. Can you give me a (locally reproducible-) example of your workflow, so that I could see and investigate it myself?
The JPMML-Evaluator is compatible with Java SE 8. This is a pretty generous setup. |
Hi Villu!
Steps to reproduce issue: At reproducer root directory run: mvn clean package -Pnative -Dquarkus.log.level=ALL Java: GraalVM: 21.1.0 Quarkus: 2.15.1.Final Kogito: 1.9.1.Final PMML version: 4.4 SkLearn2PMML: 0.73.5 Scikit-learn: 0.24.2 kie-dmn-jpmml: 7.57.0.Final JPMML-Evaluator: 1.5.15 JPMML-Model: 1.5.15 |
If I parsed this text correctly, then the GraalVM compilation is blocked because of an unexpected The PMML language is fully deterministic. I did a quick text search for "java.util.Random" and "random" over the JPMML-Evaluator codebase, and didn't get any matches. Therefore, I think that some other component must be responsible for instantiating this
This looks like a very helpful error description. Please re-run your experiment with
You should be using JPMML-Evaluator 1.6(.4) these days. |
Anyway, GraalVM compatibility looks like an interesting research topic. It would be interesting to AoT compile the |
Hi Villu, Actually now I'm trying to build the project with the most jpmml version (which is 1.6.4) but still no success. Now I'm getting this error when I compile to native:
Running main method
I configured additional args to build the native bundle (quarkus.native.additional-build-args=-H:+IncludeAllLocales) but I'm still facing this issue above. I have no idea how to fix this. |
Set your system's locale to Anyway, yuou can perform the JPMML-Evaluator upgrade once you have everything working with 1.5(.15). Your first objective was to find out which component was creating a |
Ok Villu. I just got back to the old version and added the trace command, here it goes:
|
This is the relevant part of the exception stack trace:
Fundamentally, the Perhaps this issue can be solved by customizing the |
Yes. Well, it is not trivial at all. I think I'll give up on trying to use graalvm. With the newset version I could build the image but I got the locale issue (even forcing to use en_US and adding all locales while generating the image bundle). If you have any suggestion to figure it out how to use jpmml with graalvm it wil be much appreciated! Thanks for the help, anyway! |
I was looking into the source code of It appears to be the case that it's possible to choose between two The logic for choosing between them is contained in There doesn't seem to be an easy/public API for overriding this logic, but I can think of a few hacks that should do. |
TL;DR: Use reflection to set the Since the latter class has private access, it might be easier to copy&paste its contents into a new public class. |
Ok Villu! Thank you so much. I will try to do that. Probably it will take some time but I will try! Again, thank you so much. |
Hello!
I created a simple PMML service with Quarkus. Direct PMML invocation through REST endpoints didn't work because the model wasn't supported.
Therefore I used JPMML implementation (https://mvnrepository.com/artifact/org.jpmml/pmml-evaluator and https://mvnrepository.com/artifact/org.jpmml/pmml-model libraries) to invoke PMML using DMN.
Such setup works when running in Local Dev Mode. However there is failure when trying to generate native executable with GraalVM.
Is there any chance to make jpmml compatible with GraalVM?
The text was updated successfully, but these errors were encountered: