Skip to content

Commit a5097a3

Browse files
author
Hanyu Cui
authored
[ML-8669] Build against TensorFlow 1.15.0 (#172)
Build against TensorFlow 1.15.0. It uses pip to install the Python package
1 parent 009e43a commit a5097a3

File tree

10 files changed

+33
-11
lines changed

10 files changed

+33
-11
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ ENV PYTHONPATH /opt/spark/python/lib/py4j-0.10.7-src.zip:/opt/spark/python/lib/p
4242
ENV PYSPARK_PYTHON python
4343

4444
# Workaround for https://github.com/tensorflow/tensorflow/issues/30635.
45-
RUN wget https://repo1.maven.org/maven2/org/tensorflow/libtensorflow_jni/1.14.0/libtensorflow_jni-1.14.0.jar && \
46-
jar xf libtensorflow_jni-1.14.0.jar org/tensorflow/native/linux-x86_64/libtensorflow_framework.so.1 && \
47-
mv org/tensorflow/native/linux-x86_64/libtensorflow_framework.so.1 /usr/lib && \
48-
rm libtensorflow_jni-1.14.0.jar
45+
RUN wget -q https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow_jni-cpu-linux-x86_64-1.15.0.tar.gz && \
46+
tar xf libtensorflow_jni-cpu-linux-x86_64-1.15.0.tar.gz && \
47+
cp libtensorflow_framework.so.1 /usr/lib
4948

5049
# The tensorframes dir will be mounted here.
5150
VOLUME /mnt/tensorframes

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ services:
99
volumes:
1010
- .:/mnt/tensorframes
1111
- ~/.ivy2:/root/.ivy2
12+
- ~/.m2:/root/.m2

environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- pandas=0.24.2
99
- nomkl
1010
- protobuf=3.6.1
11-
- tensorflow=1.14.0
1211
# test
1312
- nose=1.3.7
13+
- pip:
14+
- tensorflow==1.15.0

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object Dependencies {
22
// The spark version
33
val targetSparkVersion = sys.props.getOrElse("spark.version", "2.4.4")
4-
val targetTensorFlowVersion = "1.14.0"
4+
val targetTensorFlowVersion = "1.15.0"
55
}

python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ nose>=1.3.3
33
pandas>=0.19.1
44
# The proto files under src/main/protobuf must be in sync with the TF version here.
55
# You can use update-tf-proto.sh under dev/ to update the files.
6-
tensorflow==1.14.0
6+
tensorflow==1.15.0

src/main/protobuf/tensorflow/core/framework/node_def.proto

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "tensorflow/core/framework/attr_value.proto";
1111
message NodeDef {
1212
// The name given to this operator. Used for naming inputs,
1313
// logging, visualization, etc. Unique within a single GraphDef.
14-
// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
14+
// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_>./]*".
1515
string name = 1;
1616

1717
// The operation name. There may be custom parameters in attrs.
@@ -70,6 +70,15 @@ message NodeDef {
7070
// be {A, B}. This information can be used to map errors originating at the
7171
// current node to some top level source code.
7272
repeated string original_node_names = 1;
73+
74+
// This is intended to store the list of names of the functions from the
75+
// original graph that this node was derived. For example if this node, say
76+
// C, was result of a fusion of node A in function FA and node B in function
77+
// FB, then `original_funcs` would be {FA, FB}. If the node is in the top
78+
// level graph, the `original_func` is empty. This information, with the
79+
// `original_node_names` can be used to map errors originating at the
80+
// current ndoe to some top level source code.
81+
repeated string original_func_names = 2;
7382
};
7483

7584
// This stores debug information associated with the node.

src/main/protobuf/tensorflow/core/framework/op_def.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import "tensorflow/core/framework/types.proto";
1414
// LINT.IfChange
1515
message OpDef {
1616
// Op names starting with an underscore are reserved for internal use.
17-
// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
17+
// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
1818
string name = 1;
1919

2020
// For describing inputs and outputs.

src/main/protobuf/tensorflow/core/framework/resource_handle.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ option java_multiple_files = true;
77
option java_package = "org.tensorflow.framework";
88
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
99

10+
import "tensorflow/core/framework/tensor_shape.proto";
11+
import "tensorflow/core/framework/types.proto";
12+
1013
// Protocol buffer representing a handle to a tensorflow resource. Handles are
1114
// not valid across executions, but can be serialized back and forth from within
1215
// a single run.
@@ -27,4 +30,13 @@ message ResourceHandleProto {
2730
// For debug-only, the name of the type pointed to by this handle, if
2831
// available.
2932
string maybe_type_name = 5;
33+
34+
// Protocol buffer representing a pair of (data type, tensor shape).
35+
message DtypeAndShape {
36+
DataType dtype = 1;
37+
TensorShapeProto shape = 2;
38+
}
39+
40+
// Data types and shapes for the underlying resource.
41+
repeated DtypeAndShape dtypes_and_shapes = 6;
3042
};

src/main/protobuf/tensorflow/core/framework/types.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ enum DataType {
6767
DT_UINT64_REF = 123;
6868
}
6969
// LINT.ThenChange(
70-
// https://www.tensorflow.org/code/tensorflow/c/c_api.h,
70+
// https://www.tensorflow.org/code/tensorflow/c/tf_datatype.h,
7171
// https://www.tensorflow.org/code/tensorflow/go/tensor.go,
7272
// https://www.tensorflow.org/code/tensorflow/core/framework/tensor.cc,
7373
// https://www.tensorflow.org/code/tensorflow/core/framework/types.h,

src/main/protobuf/tensorflow/core/framework/variable.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ option java_outer_classname = "VariableProtos";
77
option java_multiple_files = true;
88
option java_package = "org.tensorflow.framework";
99

10-
// add go_package externally with copybara
10+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
1111

1212
// Indicates when a distributed variable will be synced.
1313
enum VariableSynchronization {

0 commit comments

Comments
 (0)