tensorflow / java

Java bindings for TensorFlow
Apache License 2.0
785 stars 193 forks source link

Inquiry Regarding the Requirement for Java Version 11 in Version 0.5.0 #547

Open ewan0x79 opened 3 weeks ago

ewan0x79 commented 3 weeks ago

Hello, I am a user of the TensorFlow Java API, and I've noticed that in the recent update to version 0.5.0, the minimum required Java version was raised to JDK 11. While I understand that updating the technology stack can leverage new version advantages and features, this change presents some challenges for users like us. In our production environment, many servers are still running on JDK 8. Due to various reasons, including compatibility and stability concerns, upgrading to JDK 11 is not an immediately viable option. This means we are unable to upgrade to the latest version of the TensorFlow Java API, potentially missing out on important performance improvements and new features. I am curious about the rationale behind this decision to increase the Java version requirement. Was the impact on users still on JDK 8 considered? Is there any possibility of providing support for JDK 8 in the future, or are there other solutions or recommendations you could offer to help users like us continue to utilize the TensorFlow Java API?

Craigacp commented 3 weeks ago

We released TF-Java 0.5.0 more than a year ago, and the upcoming v1.0 will also require Java 11. Much of the Java ecosystem is now baselining on Java 17 as 8 was released more than a decade ago. That said, 0.5.0 and the upcoming v1.0 haven't moved too much past Java 8 in terms of the TF-Java codebase, so compiling it for Java 8 will likely require minimal changes (e.g. removing the error prone and spotless plugins as they require newer Java versions, and then a few locations which use var or collections factories). If you want to do that I would recommend starting that from v1.0-rc1 as the build system changes will make it much easier for you to compile TF-Java.

We don't have the resources to maintain older versions of TF-Java, and Google have stopped publishing patch releases for older versions of TF, so it's not possible to upgrade 0.4.0 to a newer TF version.