Skip to content

Commit e22da70

Browse files
authored
Release TF-Java 0.4.2 (#474)
1 parent 5596276 commit e22da70

File tree

13 files changed

+51
-34
lines changed

13 files changed

+51
-34
lines changed

Diff for: .github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
tar xzf $HOME/apache-maven-3.6.3-bin.tar.gz -C /opt/
106106
ln -sf /opt/apache-maven-3.6.3/bin/mvn /usr/bin/mvn
107107
echo Downloading Bazel
108-
curl -L https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-installer-linux-x86_64.sh -o bazel.sh --retry 10
108+
curl -L https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-installer-linux-x86_64.sh -o bazel.sh --retry 10
109109
bash bazel.sh
110110
if [[ "${{ matrix.ext }}" == *-gpu ]]; then
111111
echo Installing CUDA
@@ -160,7 +160,7 @@ jobs:
160160
run: |
161161
python3 -m pip install numpy six
162162
echo Downloading Bazel
163-
curl -L https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-installer-darwin-x86_64.sh -o bazel.sh --retry 10
163+
curl -L https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-installer-darwin-x86_64.sh -o bazel.sh --retry 10
164164
bash bazel.sh
165165
brew install libomp perl
166166
- name: Checkout repository
@@ -209,7 +209,7 @@ jobs:
209209
bash.exe -lc "find 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/' -iname '14.1*' -exec rm -Rf {} \;"
210210
echo Downloading Bazel
211211
mkdir C:\bazel
212-
curl.exe -L https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-windows-x86_64.exe -o C:/bazel/bazel.exe --retry 10
212+
curl.exe -L https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-windows-x86_64.exe -o C:/bazel/bazel.exe --retry 10
213213
set "EXT=${{ matrix.ext }}"
214214
if "%EXT:~-4%" == "-gpu" (
215215
echo Removing some unused stuff to avoid running out of disk space

Diff for: README.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ systems, you should add the following dependencies:
5656
<dependency>
5757
<groupId>org.tensorflow</groupId>
5858
<artifactId>tensorflow-core-api</artifactId>
59-
<version>0.4.1</version>
59+
<version>0.4.2</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>org.tensorflow</groupId>
6363
<artifactId>tensorflow-core-api</artifactId>
64-
<version>0.4.1</version>
64+
<version>0.4.2</version>
6565
<classifier>linux-x86_64${javacpp.platform.extension}</classifier>
6666
</dependency>
6767
```
@@ -72,24 +72,24 @@ native dependencies as follows:
7272
<dependency>
7373
<groupId>org.tensorflow</groupId>
7474
<artifactId>tensorflow-core-api</artifactId>
75-
<version>0.4.1</version>
75+
<version>0.4.2</version>
7676
</dependency>
7777
<dependency>
7878
<groupId>org.tensorflow</groupId>
7979
<artifactId>tensorflow-core-api</artifactId>
80-
<version>0.4.1</version>
80+
<version>0.4.2</version>
8181
<classifier>linux-x86_64${javacpp.platform.extension}</classifier>
8282
</dependency>
8383
<dependency>
8484
<groupId>org.tensorflow</groupId>
8585
<artifactId>tensorflow-core-api</artifactId>
86-
<version>0.4.1</version>
86+
<version>0.4.2</version>
8787
<classifier>macosx-x86_64${javacpp.platform.extension}</classifier>
8888
</dependency>
8989
<dependency>
9090
<groupId>org.tensorflow</groupId>
9191
<artifactId>tensorflow-core-api</artifactId>
92-
<version>0.4.1</version>
92+
<version>0.4.2</version>
9393
<classifier>windows-x86_64${javacpp.platform.extension}</classifier>
9494
</dependency>
9595
```
@@ -102,7 +102,7 @@ artifact includes transitively all the artifacts above as a single dependency:
102102
<dependency>
103103
<groupId>org.tensorflow</groupId>
104104
<artifactId>tensorflow-core-platform${javacpp.platform.extension}</artifactId>
105-
<version>0.4.1</version>
105+
<version>0.4.2</version>
106106
</dependency>
107107
```
108108

@@ -141,15 +141,16 @@ to add Sonatype OSS repository in your pom.xml, like the following
141141

142142
This table shows the mapping between different version of TensorFlow for Java and the core runtime libraries.
143143

144-
| TensorFlow Java Version | TensorFlow Version |
145-
| ------------- | ------------- |
146-
| 0.2.0 | 2.3.1 |
147-
| 0.3.0 | 2.4.1 |
148-
| 0.3.1 | 2.4.1 |
149-
| 0.3.2 | 2.4.1 |
150-
| 0.3.3 | 2.4.1 |
151-
| 0.4.0 | 2.7.0 |
152-
| 0.4.1 | 2.7.1 |
144+
| TensorFlow Java Version | TensorFlow Version |
145+
|-------------------------|--------------------|
146+
| 0.2.0 | 2.3.1 |
147+
| 0.3.0 | 2.4.1 |
148+
| 0.3.1 | 2.4.1 |
149+
| 0.3.2 | 2.4.1 |
150+
| 0.3.3 | 2.4.1 |
151+
| 0.4.0 | 2.7.0 |
152+
| 0.4.1 | 2.7.1 |
153+
| 0.4.2 | 2.7.4 |
153154

154155
## How to Contribute?
155156

Diff for: docs/install.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ For example,
6464
<dependency>
6565
<groupId>org.tensorflow</groupId>
6666
<artifactId>tensorflow-core-platform</artifactId>
67-
<version>0.4.1</version>
67+
<version>0.4.2</version>
6868
</dependency>
6969
```
7070

@@ -170,7 +170,7 @@ add the TensorFlow dependency to the project's `pom.xml` file:
170170
<dependency>
171171
<groupId>org.tensorflow</groupId>
172172
<artifactId>tensorflow-core-platform</artifactId>
173-
<version>0.4.1</version>
173+
<version>0.4.2</version>
174174
</dependency>
175175
</dependencies>
176176
</project>

Diff for: pom.xml

+1-1
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>0.4.1</version>
10+
<version>0.4.2</version>
1111
<packaging>pom</packaging>
1212

1313
<name>TensorFlow Java Parent</name>

Diff for: tensorflow-core/pom.xml

+1-1
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>0.4.1</version>
25+
<version>0.4.2</version>
2626
</parent>
2727
<artifactId>tensorflow-core</artifactId>
2828
<packaging>pom</packaging>

Diff for: tensorflow-core/tensorflow-core-api/.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.2
1+
4.2.1

Diff for: tensorflow-core/tensorflow-core-api/WORKSPACE

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ http_archive(
1616
],
1717
patch_tool = "patch",
1818
patch_args = ["-p1"],
19-
patch_cmds = ["grep -rl 'java_package' tensorflow/core | xargs sed -i.bak 's/^\(.* java_package = \"org\.tensorflow\.\)\(.*\"\)/\\1proto.\\2'/"],
19+
patch_cmds = ["grep -rl 'java_package' tensorflow/core | xargs sed -i.bak 's/^\\(.* java_package = \"org\\.tensorflow\\.\\)\\(.*\"\\)/\\1proto.\\2'/"],
2020
urls = [
21-
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.7.1.tar.gz",
21+
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.7.4.tar.gz",
2222
],
23-
sha256 = "abebe2cf5ca379e18071693ca5f45b88ade941b16258a21cc1f12d77d5387a21",
24-
strip_prefix = "tensorflow-2.7.1"
23+
sha256 = "75b2e40a9623df32da16d8e97528f5e02e4a958e23b1f2ee9637be8eec5d021b",
24+
strip_prefix = "tensorflow-2.7.4"
2525
)
2626

2727
# START: Upstream TensorFlow dependencies

Diff for: tensorflow-core/tensorflow-core-api/pom.xml

+1-1
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>0.4.1</version>
9+
<version>0.4.2</version>
1010
</parent>
1111
<artifactId>tensorflow-core-api</artifactId>
1212
<packaging>jar</packaging>

Diff for: tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright 2019-2021 The TensorFlow Authors. All Rights Reserved.
1+
/* Copyright 2019-2022 The TensorFlow Authors. All Rights Reserved.
22
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
2020
import static org.tensorflow.internal.c_api.global.tensorflow.TF_GetAllOpList;
2121
import static org.tensorflow.internal.c_api.global.tensorflow.TF_GetOpList;
2222
import static org.tensorflow.internal.c_api.global.tensorflow.TF_LoadLibrary;
23+
import static org.tensorflow.internal.c_api.global.tensorflow.TF_RegisterFilesystemPlugin;
2324
import static org.tensorflow.internal.c_api.global.tensorflow.TF_Version;
2425

2526
import com.google.protobuf.InvalidProtocolBufferException;
@@ -108,6 +109,21 @@ public static OpList loadLibrary(String filename) {
108109
}
109110
}
110111

112+
/**
113+
* Loads the filesystem plugin from filename and registers all the filesystems it supports.
114+
*
115+
* <p>Throws a TF runtime exception if the plugin failed to load.
116+
*
117+
* @param filename Path of the dynamic library containing the filesystem support.
118+
*/
119+
public static void registerFilesystemPlugin(String filename) {
120+
try (PointerScope scope = new PointerScope()) {
121+
TF_Status status = TF_Status.newStatus();
122+
TF_RegisterFilesystemPlugin(filename, status);
123+
status.throwExceptionIfNotOK();
124+
}
125+
}
126+
111127
private static TF_Library libraryLoad(String filename) {
112128
try (PointerScope scope = new PointerScope()) {
113129
TF_Status status = TF_Status.newStatus();

Diff for: tensorflow-core/tensorflow-core-generator/pom.xml

+1-1
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>0.4.1</version>
8+
<version>0.4.2</version>
99
</parent>
1010
<artifactId>tensorflow-core-generator</artifactId>
1111
<packaging>jar</packaging>

Diff for: tensorflow-core/tensorflow-core-platform-gpu/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.tensorflow</groupId>
2424
<artifactId>tensorflow-core</artifactId>
25-
<version>0.4.1</version>
25+
<version>0.4.2</version>
2626
</parent>
2727
<artifactId>tensorflow-core-platform-gpu</artifactId>
2828
<name>TensorFlow Core API Library Platform GPU</name>

Diff for: tensorflow-core/tensorflow-core-platform/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.tensorflow</groupId>
2424
<artifactId>tensorflow-core</artifactId>
25-
<version>0.4.1</version>
25+
<version>0.4.2</version>
2626
</parent>
2727
<artifactId>tensorflow-core-platform</artifactId>
2828
<name>TensorFlow Core API Library Platform</name>

Diff for: tensorflow-framework/pom.xml

+1-1
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>0.4.1</version>
25+
<version>0.4.2</version>
2626
</parent>
2727
<artifactId>tensorflow-framework</artifactId>
2828
<packaging>jar</packaging>

0 commit comments

Comments
 (0)