Skip to content

Commit

Permalink
Rename tensorflow-api folder to tensorflow-java-api
Browse files Browse the repository at this point in the history
Change-Id: Iafbda071444b976f546f3a56ede4999b609a7911
  • Loading branch information
frankfliu committed Sep 17, 2020
1 parent 8fa22dc commit a20892a
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 147 deletions.
2 changes: 1 addition & 1 deletion docs/development/dependency_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ See [How to use DJL's BOM](../../bom/README.md#how-to-use-djls-bom) for detail.
| | [pytorch-native-cpu-precxx11(linux-x86_64)](../../pytorch/pytorch-engine/README.md#centos-7ubuntu-1404-cpu) | Contains PyTorch native library for centOS 7 and Ubuntu 14.04 |
| | | |
| [ai.djl.tensorflow](https://search.maven.org/search?q=g:ai.djl.tensorflow) | [tensorflow-engine](../../tensorflow/tensorflow-engine/README.md#installation) | TensorFlow engine adapter |
| | [tensorflow-api](../../tensorflow/tensorflow-api/README.md#installation) | A redistribution of tensorFlow core java API 2.x |
| | [tensorflow-api](../../tensorflow/tensorflow-java-api/README.md#installation) | A redistribution of tensorFlow core java API 2.x |
| | [tensorflow-model-zoo](../../tensorflow/tensorflow-model-zoo/README.md#installation) | Contains state of the art TensorFlow saved bundle models |
| | [tensorflow-native-auto](../../tensorflow/README.md#automatic-recommended) | A placeholder package to automatically download native libraries for your platform |
| | [tensorflow-native-cpu(osx-x86_64)](../../tensorflow/README.md#macos) | Contains TensorFlow native library for macOS |
Expand Down
5 changes: 1 addition & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include ':mxnet:jnarator'
include ':mxnet:mxnet-engine'
include ':mxnet:mxnet-model-zoo'
include ':mxnet:native'
include ':tensorflow:tensorflow-api'
include ':tensorflow:tensorflow-java-api'
include ':tensorflow:tensorflow-engine'
include ':tensorflow:tensorflow-model-zoo'
include ':tensorflow:tensorflow-native'
Expand All @@ -22,6 +22,3 @@ include ':extensions:aws-ai'
include ':extensions:hadoop'
include ':extensions:fasttext'
include ':extensions:sentencepiece'

// FIXME: a temporary hack for TF 2.3.0
project(":tensorflow:tensorflow-api").name = "repackage"
2 changes: 1 addition & 1 deletion tensorflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It is based off the [TensorFlow Deep Learning Framework](https://www.tensorflow.
The DJL TensorFlow Engine allows you to run prediction with TensorFlow or Keras models using Java.
It has the following 4 modules:

1. [TensorFlow core api](tensorflow-api/README.md): the TensorFlow 2.x java binding.
1. [TensorFlow core api](tensorflow-java-api/README.md): the TensorFlow 2.x java binding.
2. [TensorFlow engine](tensorflow-engine/README.md): TensorFlow engine adapter for DJL high level APIs. (NDArray, Model, Predictor, etc)
3. [TensorFlow model zoo](tensorflow-model-zoo/README.md): Includes pre-trained TensorFlow models and built-int translators for direct import and use.
4. [TensorFlow native auto](tensorflow-native/README.md): A placeholder to automatically detect your platform and download the correct native TensorFlow libraries for you.
Expand Down
140 changes: 0 additions & 140 deletions tensorflow/tensorflow-api/build.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion tensorflow/tensorflow-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {

dependencies {
api project(":api")
api "ai.djl.tensorflow:tensorflow-api:0.7.0"
api "ai.djl.tensorflow:tensorflow-api:${version}"

testImplementation("org.testng:testng:${testng_version}") {
exclude group: "junit", module: "junit"
Expand Down
File renamed without changes.
File renamed without changes.
66 changes: 66 additions & 0 deletions tensorflow/tensorflow-java-api/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
group "ai.djl.tensorflow"

repositories {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}

configurations {
exclusion
repachange
}

// TODO: remove this when upgrade to TF 2.4
sourceSets {
main {
resources {
srcDirs = []
}
}
}

dependencies {
api "org.bytedeco:javacpp:1.5.4"
api "com.google.protobuf:protobuf-java:3.8.0"
// api("org.tensorflow:tensorflow-core-api:0.2.0-SNAPSHOT") {
// exclude group: "org.bytedeco", module: "javacpp"
// }
// api "org.tensorflow:tensorflow-tools:0.1.0-SNAPSHOT"
// api "org.tensorflow:ndarray:0.2.0-SNAPSHOT"
//
exclusion "org.bytedeco:javacpp:1.5.3"
exclusion "com.google.protobuf:protobuf-java:3.8.0"

repachange "ai.djl.tensorflow:tensorflow-api:0.7.0"
}

jar {
from {
(configurations.repachange - configurations.exclusion).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}

publishing {
publications {
maven(MavenPublication) {
artifactId "tensorflow-api"
pom {
name = "DJL release for TensorFlow core api"
description = "Deep Java Library (DJL) release for TensorFlow core api"
url = "http://www.djl.ai/tensorflow/${project.name}"

withXml {
Node pomNode = asNode()
pomNode.dependencies."*".findAll() {
it.artifactId.text().startsWith("tensorflow-") || it.artifactId.text().startsWith("ndarray")
}.each() {
it.parent().remove(it)
}
}
}
}
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions tools/gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ configure([
project(':mxnet:mxnet-model-zoo'),
project(':pytorch:pytorch-engine'),
project(':pytorch:pytorch-model-zoo'),
project(':tensorflow:tensorflow-java-api'),
project(':tensorflow:tensorflow-engine'),
project(':tensorflow:tensorflow-model-zoo'),
project(':onnxruntime:onnxruntime-engine'),
Expand Down

0 comments on commit a20892a

Please sign in to comment.