Closed odinsbane closed 3 months ago
Hi @odinsbane , starting from tensorflow java 1.0.0-rc1, the module has been renamed to simply tensorflow
Which makes me realize that this indication is missing in our migration instructions, I’ll make sure to add this as well, thank you
That did it, I changed the requires then everything built and even ran successfully.
@karllessard Something else that might be good to explain. Instead of using the artifact-id to denote the GPU version. Now it uses the "tensorflow-core-natives" with <classifier>linux-x86_64-gpu</classifier>
to get the gpu natives. I didn't find the distinction until I went through the maven repos a bit.
@odinsbane that part is mentioned in the migrating guide though, please look at this section: https://github.com/tensorflow/java/blob/master/MIGRATING.md#native-artifact-renaming
@karllessard I was specifically referring to the tensorflow-core-platform-gpu
artifact which no longer exists. The 0.5.0 example seems a little strange because it has the same artifactId twice, but one has an identifier.
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.5.0</version>
<classifier>linux-x86_64</classifier>
</dependency>
The way I did it used the <artifactId>tensorflow-core-platform-gpu</artifactId>
. Maybe it is clear, and I don't understand how the maven classifiers work well enough.
The platform artifact pulls in a set of native libraries (currently Windows x86_64, Linux x86_64, macOS x86_64 and macOS arm64), and the platform gpu artifact used to pull in both Linux & Windows GPU binaries until Google stopped supporting Windows GPU binaries. When that happened we stopped making a platform-gpu artifact because it was identical to depending on org.tensorflow:tensorflow-core-native:1.0.0-rc.1:linux-x86_64-gpu
.
System information
When I tried to upgrade to 1.0.0.rc-1 I get
src/main/java/module-info.java:[4,17] module not found: org.tensorflow
Provide the exact sequence of commands / steps that you executed before running into the problem
I have a working pom.xml with the dependency.
I wanted to switch to the 1.0.0 release candidate by following the github page.
Then my module-info.java causes an error and the project doesn't compile.
I could setup a complete source code + pom.xml to reproduce the problem. Maybe this problem is simpler than that though, and I am using the wrong dependencies.