-
Notifications
You must be signed in to change notification settings - Fork 214
Modular Java app can't create tensor object #509
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
Comments
Can you build the head of the |
Oops, things start to go beyond my experience... I have created sample project, based on official example. Please check with public GitHub link for branch "modular". It reproduces the problem at commit 918567b97809afac605d6de57de5b5ffe2a1aebc. Failure points out to another issue, on a different API call, namely "TensorFlow.version()". That hints my problem was masked by another one. See attached call stack. As a work-around, I've added dependence on TensorFlow API for Windows, my current platform. That fixes the problem, as you can see at revision b66d7456fad9100dadeef4a44aa19bded2879767. There's hint in the doc for that topic, possibly I didn't understand it. excerpt from file build.gradle
If anybody thinks that the final fix was my extra action and selection of platform must happen automatically, please submit another ticket or repurpose this one. Anyway, all warnings mentioned in ticket description, still exist and are numerous. |
/cc @HGuillemet |
System information
java -version
): 17.0.2Describe the current behavior
Java Gradle project, as built from IntelliJ IDEA pattern, repeatedly reports a fatal warning on attempt to create a tensor object. See the code and log below. The error raises exception that is effectively intercepted by JavaFX runtime.
The project was found having Java module support. After this support has been removed from the project, code runs just fine. However, modularity is highly desired for the application.
Describe the expected behavior
After module access permissions (exports, open's) get fixed in tensorflow-core-platform, etc., all Java objects should be created just fine, as they are in non-modular edition of the project.
Code to reproduce the issue
excerpt from file src/main/java/module-info.java:
excerpt from file build.gradle (remove shown lines to let code run with no error):
excerpt from file src/main/java/com/varankin/ocrc:
Other info / logs
Call stack has been wiped off by JavaFX, below is manual reproduction
Please do not hesitate to ask for runnable example if needed. Current project cannot be presented as-is because of IP protection requirements, and because it's bulky.
The text was updated successfully, but these errors were encountered: