Skip to content

Commit f2ec56e

Browse files
committed
Updating READMEs and bumping to 1.2.0.
1 parent 1bbd7d9 commit f2ec56e

13 files changed

Lines changed: 60 additions & 41 deletions

File tree

MIGRATING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Migrating Between TensorFlow Java Releases
22

3-
TensorFlow Java is still in an alpha stage, therefore is subject to contain breaking changes between the different releases. This guide explain in detail
4-
how to migrate your code from a previous version to a new one that includes some changes that are not backward compatible.
3+
This guide explains in detail how to migrate your code from a pre-1.0 release to a 1.0 or newer release. Post 1.0
4+
releases have API stability as much as possible, though upstream TensorFlow does remove ops from time to time and
5+
consequently those ops will be removed from TensorFlow-Java
56

6-
## Migrating to 1.0.0
7+
## Migrating to 1.0.0 or newer
78

89
TensorFlow-Java 1.0.0 requires Java 11 or later.
910

README.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ The following describes the layout of the repository and its different artifacts
2828
* Intended audience: neural network developers
2929
* For more information: [tensorflow-framework/README.md](tensorflow-framework/README.md)
3030

31-
*Note: The NdArray Library module has now its own [repository](https://github.com/tensorflow/java-ndarray) and has been moved out of TensorFlow Java.*
31+
* `tensorflow-ndarray`
32+
* API for creating and manipulating n-dimensional arrays, can be used independently from TensorFlow.
3233

3334
## Communication
3435

@@ -60,29 +61,30 @@ only binaries for the following are being **supported and distributed** by this
6061
- `linux-x86_64-gpu`: Linux platforms on Intel/AMD chips with Cuda GPU support
6162
- `linux-arm64`: Linux platforms on Arm chips
6263
- `macosx-arm64`: MacOS X platforms on Apple Silicon chips
63-
- `windows-x86_64`: Windows platforms on Intel/AMD chips (v1.1.0 and earlier)
6464

6565
Binaries for `macosx-x86_64` are available for TF-Java 1.0 series releases and earlier, they were dropped from
66-
TF-Java 1.1 and newer as they are no longer supported or released by Google.
66+
TF-Java 1.1 and newer as they are no longer supported or released by Google. Binaries for `windows-x86_64` are available
67+
for TF-Java 1.1 and earlier, they were dropped for the 1.2 release and newer as the native binaries are no longer supported or
68+
released by Google.
6769

6870
For example, for building a JAR that uses TensorFlow and is targeted to be deployed only on Linux
6971
systems with no GPU support, you should add the following dependencies:
7072
```xml
7173
<dependency>
7274
<groupId>org.tensorflow</groupId>
7375
<artifactId>tensorflow-core-api</artifactId>
74-
<version>1.1.0</version>
76+
<version>1.2.0</version>
7577
</dependency>
7678
<dependency>
7779
<groupId>org.tensorflow</groupId>
7880
<artifactId>tensorflow-core-native</artifactId>
79-
<version>1.1.0</version>
81+
<version>1.2.0</version>
8082
<classifier>linux-x86_64</classifier>
8183
</dependency>
8284
```
8385
Or Gradle:
8486
```groovy
85-
def tfVersion = '1.1.0'
87+
def tfVersion = '1.2.0'
8688
implementation "org.tensorflow:tensorflow-core-api:$tfVersion"
8789
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64"
8890
```
@@ -93,34 +95,33 @@ native dependencies as follows:
9395
<dependency>
9496
<groupId>org.tensorflow</groupId>
9597
<artifactId>tensorflow-core-api</artifactId>
96-
<version>1.1.0</version>
98+
<version>1.2.0</version>
9799
</dependency>
98100
<dependency>
99101
<groupId>org.tensorflow</groupId>
100102
<artifactId>tensorflow-core-native</artifactId>
101-
<version>1.1.0</version>
102-
<classifier>linux-x86_64-gpu</classifier>
103+
<version>1.2.0</version>
104+
<classifier>linux-arm64</classifier>
103105
</dependency>
104106
<dependency>
105107
<groupId>org.tensorflow</groupId>
106108
<artifactId>tensorflow-core-native</artifactId>
107-
<version>1.1.0</version>
108-
<classifier>macosx-arm64</classifier>
109+
<version>1.2.0</version>
110+
<classifier>linux-x86_64-gpu</classifier>
109111
</dependency>
110112
<dependency>
111113
<groupId>org.tensorflow</groupId>
112114
<artifactId>tensorflow-core-native</artifactId>
113-
<version>1.1.0</version>
114-
<classifier>windows-x86_64</classifier>
115+
<version>1.2.0</version>
116+
<classifier>macosx-arm64</classifier>
115117
</dependency>
116118
```
117119
Or Gradle:
118120
```groovy
119-
def tfVersion = '1.1.0'
121+
def tfVersion = '1.2.0'
120122
implementation "org.tensorflow:tensorflow-core-api:$tfVersion"
121123
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64-gpu"
122124
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:macosx-arm64"
123-
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:windows-x86_64"
124125
```
125126

126127
Only one dependency can be added per platform, meaning that you cannot add native dependencies to both `linux-x86_64` and
@@ -135,20 +136,20 @@ For Ubuntu 24.04, you can install them with the following command:
135136
In some cases, it might be preferable to add a single dependency that includes transitively all the artifacts
136137
required to run TensorFlow Java on any [supported platforms](README.md#individual-dependencies)
137138

138-
- `tensorflow-core-platform`: Includes `tensorflow-core-api`, plus native artifacts for `linux-x86_64`, `linux-x86_64-arm64`, `macosx-arm64` and `windows-x86_64`
139+
- `tensorflow-core-platform`: Includes `tensorflow-core-api`, plus native artifacts for `linux-x86_64`, `linux-arm64`, and `macosx-arm64`
139140

140141
For example, to run TensorFlow Java on any CPU platform for which a binary is being distributed by this project, you can
141142
simply add this dependency to your application:
142143
```xml
143144
<dependency>
144145
<groupId>org.tensorflow</groupId>
145146
<artifactId>tensorflow-core-platform</artifactId>
146-
<version>1.1.0</version>
147+
<version>1.2.0</version>
147148
</dependency>
148149
```
149150
Or Gradle:
150151
```groovy
151-
implementation "org.tensorflow:tensorflow-core-platform:1.1.0"
152+
implementation "org.tensorflow:tensorflow-core-platform:1.2.0"
152153
```
153154

154155
Be aware though that the builds of TensorFlow are quite voluminous and including too many native dependencies may
@@ -177,7 +178,7 @@ to add Sonatype OSS repository in your `pom.xml`, like the following
177178
<dependency>
178179
<groupId>org.tensorflow</groupId>
179180
<artifactId>tensorflow-core-platform</artifactId>
180-
<version>1.2.0-SNAPSHOT</version>
181+
<version>1.3.0-SNAPSHOT</version>
181182
</dependency>
182183
</dependencies>
183184
```
@@ -192,10 +193,24 @@ repositories {
192193
193194
dependencies {
194195
// Example of dependency, see section above for more options
195-
implementation "org.tensorflow:tensorflow-core-platform:1.2.0-SNAPSHOT"
196+
implementation "org.tensorflow:tensorflow-core-platform:1.3.0-SNAPSHOT"
196197
}
197198
```
198199

200+
## TensorFlow native libraries
201+
202+
TensorFlow-Java is built on top of the native TensorFlow library, and uses [JavaCPP](https://github.com/bytedeco/javacpp)
203+
to call that library which in turn uses the Java Native Interface (JNI). In [Java 24 and newer](https://openjdk.org/jeps/472)
204+
uses of JNI trigger a warning of the form:
205+
```
206+
WARNING: A restricted method in java.lang.System has been called
207+
WARNING: java.lang.System::loadLibrary has been called by org.bytedeco.javacpp.Loader in an unnamed module (file:/.../.m2/repository/org/bytedeco/javacpp/1.5.12/javacpp-1.5.12.jar)
208+
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
209+
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
210+
```
211+
This is expected, and adding the `--enable-native-access=ALL-UNNAMED` flag to enable JNI will suppress it. In a future
212+
Java version this warning may be turned into an error and the flag will be required to use TensorFlow-Java.
213+
199214
## TensorFlow/Java Version Support
200215

201216
This table shows the mapping between TensorFlow, TensorFlow Java and minimum supported Java versions.
@@ -215,7 +230,8 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup
215230
| 1.0.0-rc.2 | 2.16.2 | 11 |
216231
| 1.0.0 | 2.16.2 | 11 |
217232
| 1.1.0 | 2.18.0 | 11 |
218-
| 1.2.0-SNAPSHOT | 2.21.0 | 11 |
233+
| 1.2.0 | 2.21.0 | 11 |
234+
| 1.3.0-SNAPSHOT | 2.21.0 | 11 |
219235

220236
## How to Contribute?
221237

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Some things of note:
191191
```
192192
2. In your local copy, checkout the master branch and increase the next snapshot version.
193193
```
194-
mvn versions:set -DnewVersion=1.1.0-SNAPSHOT
194+
mvn versions:set -DnewVersion=1.3.0-SNAPSHOT
195195
```
196196
3. Update the TensorFlow Java version to reflect the new snapshot at the following locations:
197197
- https://github.com/tensorflow/java/blob/master/docs/install.md?plain=1#L104

docs/docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The following describes the layout of the repository and its different artifacts
2626
* **Intended audience**: neural network developers.
2727
* Primary API for building and training neural networks with TensorFlow.
2828

29-
### [ndarray](https://github.com/tensorflow/java-ndarray)
29+
### [tensorflow-ndarray](https://github.com/tensorflow/java/tree/master/tensorflow-ndarray)
3030
* **Intended audience**: any developer who needs a Java n-dimensional array implementation, whether or not they use it with TensorFlow.
3131
* Generic utility library for n-dimensional data I/O operations.
3232
* Used by TensorFlow but does not depend on TensorFlow.

docs/docs/install.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ following platforms:
2121
* Ubuntu 20.04 or higher; 64-bit, x86
2222
* Ubuntu 22.04 or higher; 64-bit, arm
2323
* macOS 14 or higher; 64-bit, arm
24+
25+
Tensorflow Java 1.1 and earlier has binaries for:
26+
2427
* Windows 10 or higher; 64-bit, x86
2528

26-
TensorFlow Java 1.0 series and earlier releases also have binaries for:
29+
TensorFlow Java 1.0 series and earlier has binaries for:
2730

2831
* macOS 12 or higher; 64-bit, x86
2932

@@ -63,7 +66,7 @@ For example,
6366
<dependency>
6467
<groupId>org.tensorflow</groupId>
6568
<artifactId>tensorflow-core-platform</artifactId>
66-
<version>1.1.0</version>
69+
<version>1.2.0</version>
6770
</dependency>
6871
```
6972

@@ -106,7 +109,7 @@ snapshots repository in your `pom.xml`.
106109
<dependency>
107110
<groupId>org.tensorflow</groupId>
108111
<artifactId>tensorflow-core-platform</artifactId>
109-
<version>1.2.0-SNAPSHOT</version>
112+
<version>1.3.0-SNAPSHOT</version>
110113
</dependency>
111114
</dependencies>
112115
```
@@ -123,7 +126,7 @@ repositories {
123126
}
124127
125128
dependencies {
126-
compile group: 'org.tensorflow', name: 'tensorflow-core-platform', version: '1.0.0'
129+
compile group: 'org.tensorflow', name: 'tensorflow-core-platform', version: '1.2.0'
127130
}
128131
```
129132

@@ -169,7 +172,7 @@ add the TensorFlow dependency to the project's `pom.xml` file:
169172
<dependency>
170173
<groupId>org.tensorflow</groupId>
171174
<artifactId>tensorflow-core-platform</artifactId>
172-
<version>1.1.0</version>
175+
<version>1.2.0</version>
173176
</dependency>
174177
</dependencies>
175178
</project>

docs/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ site_name: ''
22
site_url: https://tensorflow.org
33
repo_url: https://github.com/tensorflow/java
44
site_description: Documentation of TensorFlow Java API and tools.
5-
copyright: "&copy; TensorFlow Authors 2025"
5+
copyright: "&copy; TensorFlow Authors 2026"
66

77
theme:
88
name: material

pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>org.tensorflow</groupId>
99
<artifactId>tensorflow-java</artifactId>
10-
<version>1.2.0-SNAPSHOT</version>
10+
<version>1.2.0</version>
1111
<packaging>pom</packaging>
1212

1313
<name>TensorFlow Java Parent</name>
@@ -543,7 +543,7 @@
543543
<configuration>
544544
<overview>./docs/overview.md</overview>
545545
<!--<includeDependencySources>true</includeDependencySources>-->
546-
<bottom>Copyright 2015, 2025 The TensorFlow Authors. All Rights Reserved.</bottom>
546+
<bottom>Copyright 2015, 2026 The TensorFlow Authors. All Rights Reserved.</bottom>
547547
<additionalJOptions>
548548
<additionalJOption>-Xmaxerrs</additionalJOption>
549549
<additionalJOption>65536</additionalJOption>
@@ -554,7 +554,6 @@
554554
<minmemory>256m</minmemory>
555555
<maxmemory>2048m</maxmemory>
556556
<links>
557-
<link>https://tensorflow.github.io/java/javadoc-ndarray/v1.0.0/</link>
558557
<link>https://protobuf.dev/reference/java/api-docs</link>
559558
<link>https://bytedeco.org/javacpp/apidocs</link>
560559
</links>

tensorflow-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.tensorflow</groupId>
2424
<artifactId>tensorflow-java</artifactId>
25-
<version>1.2.0-SNAPSHOT</version>
25+
<version>1.2.0</version>
2626
</parent>
2727
<artifactId>tensorflow-core</artifactId>
2828
<packaging>pom</packaging>

tensorflow-core/tensorflow-core-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.tensorflow</groupId>
88
<artifactId>tensorflow-core</artifactId>
9-
<version>1.2.0-SNAPSHOT</version>
9+
<version>1.2.0</version>
1010
</parent>
1111
<artifactId>tensorflow-core-api</artifactId>
1212
<packaging>jar</packaging>

tensorflow-core/tensorflow-core-generator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.tensorflow</groupId>
77
<artifactId>tensorflow-core</artifactId>
8-
<version>1.2.0-SNAPSHOT</version>
8+
<version>1.2.0</version>
99
</parent>
1010
<artifactId>tensorflow-core-generator</artifactId>
1111
<packaging>jar</packaging>

0 commit comments

Comments
 (0)