Skip to content

Commit

Permalink
Releasing 1.0.0 RC2 (#560)
Browse files Browse the repository at this point in the history
* Graph is changed to public in Session.java (#535)

* Merge doc changes from r1.0

* Fix unknown shapes in signature proto

* Update NdArray dependency

* Fix spotless check

* Fix broadcastMask/Update

Accept partially unknown shaped mask

* linux-arm64: add build artifact item for linux-arm64 platform

TensorFlow v2.16.1 wheel artifacts and the jar build support are added

* linux-arm64 fixes to package the right dependencies into tensorflow native jar

* Fix javadoc

Co-authored-by: Adam Pocock <[email protected]>

* Add instructions for new module names (#554)

* CI: add CI support for linux-arm64 platform (#548)

* Fix/javadoc script (#555)

* Update macos x86 runner

* Don’t deploy missing linux-arm64 build

* Cleanup missing Linux-arm64 dependencies

* Use org large runners for Linux arm64

* Using setup-java for linux-arm64

* Switch to zulu

* Add back Linux arm64 artifacts (#556)

* Upgrade to TF2.16.2 (#557)

* Link to libomp full name (#558)

* Releasing 1.0.0 RC2

---------

Co-authored-by: manojava98 <[email protected]>
Co-authored-by: Sunita Nadampalli <[email protected]>
Co-authored-by: Adam Pocock <[email protected]>
Co-authored-by: snadampal <[email protected]>
  • Loading branch information
5 people authored Sep 24, 2024
1 parent 8f5f7e9 commit 1cc2efa
Show file tree
Hide file tree
Showing 285 changed files with 1,221 additions and 914 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,34 @@ jobs:
fi
echo "Repository URL: $REPOSITORY_URL"
echo "::set-output name=repositoryUrl::$REPOSITORY_URL"
linux-arm64:
runs-on: ubuntu-2204-arm64-2c
needs: prepare
strategy:
matrix:
ext: [""]
steps:
- name: Install environment
run: |
sudo apt update
sudo apt install -y curl wget unzip tar git gcc g++
- name: Configure Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
architecture: 'aarch64'
- name: Checkout repository
uses: actions/checkout@v1
- name: Build project
run: |
gcc --version
mvn -version
echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
- name: Deploy native artifact
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
linux-x86_64:
runs-on: ubuntu-20.04
needs: prepare
Expand Down Expand Up @@ -110,7 +138,7 @@ jobs:
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
macosx-x86_64:
runs-on: macos-11
runs-on: macos-12
needs: prepare
strategy:
matrix:
Expand Down Expand Up @@ -178,10 +206,9 @@ jobs:
run: |
call mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
if ERRORLEVEL 1 exit /b
deploy:
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') }} # DEPLOY_SNAPSHOT (releases should be signed and deployed manually from local machine)
needs: [linux-x86_64, macosx-x86_64, windows-x86_64, macosx-arm64]
needs: [linux-x86_64, macosx-x86_64, windows-x86_64, macosx-arm64, linux-arm64]
runs-on: ubuntu-20.04
steps:
- name: Configure Java
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ To upgrade the version of TensorFlow that is embedded within TensorFlow Java, pl
### Upgrading TensorFlow Native Library

1. Download locally the archive of the tensorflow release at https://github.com/tensorflow/tensorflow/archive/refs/tags/vX.X.X.tar.gz
2. Compute the SHA sum using the shell command `sha256sum <tensorflow-x.x.x.tar.gz>`
2. Compute the SHA sum using the shell command `shasum -a 256 <tensorflow-x.x.x.tar.gz>`
3. Update `urls`, `sha256` and `strip_prefix` fields of the `org_tensorflow` archive rule in Bazel [workspace](https://github.com/tensorflow/java/blob/master/tensorflow-core/tensorflow-core-native/WORKSPACE#L19)
4. Extract the archive in a temporary folder
5. Copy the content of `tensorflow-x.x.x/.bazelrc` file to `tensorflow-core/tensorflow-core-native/tensorflow.bazelrc` under TensorFlow Java source tree
Expand Down
8 changes: 8 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ will now be
<classifier>linux-x86_64</classifier>
</dependency>
```
### Java Module Renaming

The Java Module (jigsaw) names has been updated to drop the leading `org.`, as follow:
- `tensorflow-core-api` : `tensorflow` (was `org.tensorflow` before)
- `tensorflow-core-generator` : `tensorflow.generator` (was `org.tensorflow-generator` before)
- `tensorflow-core-native` : `tensorflow.nativelib`
- `tensorflow-framework` : `tensorflow.framework` (was `org.tensorflow.framework` before)

### Session Run Result

In versions before 0.4.0 `Session.Runner.run` and `TensorFunction.call` returned a `List<Tensor>`. In newer versions
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ only binaries for the followings are being **supported and distributed** by this

- `linux-x86_64`: Linux platforms on Intel/AMD chips
- `linux-x86_64-gpu`: Linux platforms on Intel/AMD chips with Cuda GPU support
- `linux-arm64`: Linux platforms on Arm chips
- `macosx-x86_64`: MacOS X platforms on Intel/AMD chips
- `macosx-arm64`: MacOS X platforms on Apple Silicon chips
- `windows-x86_64`: Windows platforms on Intel/AMD chips
Expand All @@ -68,12 +69,12 @@ systems with no GPU support, you should add the following dependencies:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-native</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
<classifier>linux-x86_64</classifier>
</dependency>
```
Expand All @@ -84,24 +85,24 @@ native dependencies as follows:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-native</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
<classifier>linux-x86_64-gpu</classifier>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-native</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
<classifier>macosx-arm64</classifier>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-native</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
<classifier>windows-x86_64</classifier>
</dependency>
```
Expand All @@ -122,7 +123,7 @@ simply add this dependency to your application:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-platform</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
</dependency>
```

Expand Down Expand Up @@ -172,8 +173,9 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup
| 0.4.1 | 2.7.1 | 8 |
| 0.4.2 | 2.7.4 | 8 |
| 0.5.0 | 2.10.1 | 11 |
| 1.0.0-rc.1 | 2.16.1 | 11 |
| 1.0.0-SNAPSHOT | 2.16.1 | 11 |
| 1.0.0-rc.1 | 2.16.1 | 11 |
| 1.0.0-rc.2 | 2.16.2 | 11 |
| 1.0.0-SNAPSHOT | 2.16.2 | 11 |

## How to Contribute?

Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ For example,
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-platform</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
</dependency>
```

Expand Down Expand Up @@ -164,7 +164,7 @@ add the TensorFlow dependency to the project's `pom.xml` file:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-platform</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
</dependency>
</dependencies>
</project>
Expand Down
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-java</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
<packaging>pom</packaging>

<name>TensorFlow Java Parent</name>
Expand All @@ -26,7 +26,7 @@

<scm>
<url>https://github.com/tensorflow/java.git</url>
<connection>[email protected]:tensorflow/java.git</connection>
<connection>scm:[email protected]:tensorflow/java.git</connection>
<developerConnection>scm:git:https://github.com/tensorflow/java.git</developerConnection>
</scm>

Expand Down Expand Up @@ -329,6 +329,18 @@
</property>
</activation>
</profile>
<profile>
<id>linux-arm64</id>
<activation>
<os>
<name>linux</name>
<arch>aarch64</arch>
</os>
<property>
<name>!javacpp.platform.extension</name>
</property>
</activation>
</profile>
<profile>
<id>macosx</id>
<activation>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-java</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
</parent>
<artifactId>tensorflow-core</artifactId>
<packaging>pom</packaging>
Expand Down
10 changes: 8 additions & 2 deletions tensorflow-core/tensorflow-core-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core</artifactId>
<version>1.0.0-rc.1</version>
<version>1.0.0-rc.2</version>
</parent>
<artifactId>tensorflow-core-api</artifactId>
<packaging>jar</packaging>
Expand All @@ -15,7 +15,7 @@
<description>Platform-dependent native code and pure-Java code for the TensorFlow machine intelligence library.</description>

<properties>
<ndarray.version>1.0.0-rc.1</ndarray.version>
<ndarray.version>1.0.0</ndarray.version>
<truth.version>1.1.5</truth.version>
<test.download.skip>false</test.download.skip>
<test.download.folder>${project.build.directory}/tf-text-download/</test.download.folder>
Expand Down Expand Up @@ -230,6 +230,12 @@
<goal>jar</goal>
</goals>
<configuration>
<additionalJOptions>
<additionalJOption>-Xmaxerrs</additionalJOption>
<additionalJOption>65536</additionalJOption>
<additionalJOption>-Xmaxwarns</additionalJOption>
<additionalJOption>65536</additionalJOption>
</additionalJOptions>
<failOnError>false</failOnError>
<minmemory>256m</minmemory>
<maxmemory>2048m</maxmemory>
Expand Down
4 changes: 2 additions & 2 deletions tensorflow-core/tensorflow-core-api/scripts/test_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ DOWNLOAD_FOLDER="$1"

case ${PLATFORM:-} in
'linux-x86_64')
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/c5/ef/5b8270e5665923bda4222f56382d9fbcb7fd6efd5fb8557ad0776848cdff/tensorflow_text-2.16.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/43/dd/8f03331107b76e63313d2089ddfbd13f15e51fb8ed73517cdd0ab3341928/tensorflow-2.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
;;
'macosx-x86_64')
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/ed/5d/b55f48cdf98a164d293f660748c2501ea828e148250a4cadbb5b0d988735/tensorflow_text-2.16.1-cp311-cp311-macosx_10_9_x86_64.whl'
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/6d/69/9999c2d9e8a3b08dfcfc7e9259a05fb1da5f700936091d2eb4a7985c2776/tensorflow-2.16.2-cp311-cp311-macosx_10_15_x86_64.whl'
;;
*)
echo "TensorFlow Text distribution for ${PLATFORM} is not supported for download"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,18 @@ op {
endpoint {
name: "math.SegmentSum"
}
description: <<END
Read
[the section on segmentation](https://tensorflow.org/api_docs/python/tf/math#Segmentation)
for an explanation of segments.
Computes a tensor such that
\\(output_i = \sum_j data_j\\) where sum is over `j` such
that `segment_ids[j] == i`.
If the sum is empty for a given segment ID `i`, `output[i] = 0`.
Note that this op is currently only supported with jit_compile=True.
END
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* An API for building {@code audio} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class AudioOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* An API for building {@code bitwise} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class BitwiseOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* An API for building {@code cluster} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class ClusterOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* An API for building {@code collective} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class CollectiveOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
/**
* An API for building {@code data.experimental} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class DataExperimentalOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
/**
* An API for building {@code data} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class DataOps {
public final DataExperimentalOps experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* An API for building {@code debugging} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class DebuggingOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* An API for building {@code distribute} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class DistributeOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* An API for building {@code dtypes} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class DtypesOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
/**
* An API for building {@code image} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class ImageOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
/**
* An API for building {@code io} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class IoOps {
private final Scope scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
/**
* An API for building {@code linalg} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class LinalgOps {
public final LinalgSparseOps sparse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/**
* An API for building {@code linalg.sparse} operations as {@link Op Op}s
*
* @see {@link Ops}
* @see Ops
*/
public final class LinalgSparseOps {
private final Scope scope;
Expand Down
Loading

0 comments on commit 1cc2efa

Please sign in to comment.