Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML-8669] Build against TensorFlow 1.15.0 RC #174

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ ENV PYTHONPATH /opt/spark/python/lib/py4j-0.10.7-src.zip:/opt/spark/python/lib/p
ENV PYSPARK_PYTHON python

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do this in my local build as well.


# The tensorframes dir will be mounted here.
VOLUME /mnt/tensorframes
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ services:
volumes:
- .:/mnt/tensorframes
- ~/.ivy2:/root/.ivy2
- ~/.m2:/root/.m2
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- pandas=0.24.2
- nomkl
- protobuf=3.6.1
- tensorflow=1.14.0
# test
- nose=1.3.7
- pip:
- tensorflow==1.15.0-rc3
3 changes: 2 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ object Shading extends Build {
tagRelease,
setNextVersion,
commitNextVersion
)
),
resolvers += Resolver.bintrayRepo("meng", "spark-3.0-snapshots")
)

lazy val sparkDependencies = Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object Dependencies {
// The spark version
val targetSparkVersion = sys.props.getOrElse("spark.version", "2.4.4")
val targetTensorFlowVersion = "1.14.0"
val targetTensorFlowVersion = "1.15.0-rc3"
}
11 changes: 10 additions & 1 deletion src/main/protobuf/tensorflow/core/framework/node_def.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "tensorflow/core/framework/attr_value.proto";
message NodeDef {
// The name given to this operator. Used for naming inputs,
// logging, visualization, etc. Unique within a single GraphDef.
// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_>./]*".
string name = 1;

// The operation name. There may be custom parameters in attrs.
Expand Down Expand Up @@ -70,6 +70,15 @@ message NodeDef {
// be {A, B}. This information can be used to map errors originating at the
// current node to some top level source code.
repeated string original_node_names = 1;

// This is intended to store the list of names of the functions from the
// original graph that this node was derived. For example if this node, say
// C, was result of a fusion of node A in function FA and node B in function
// FB, then `original_funcs` would be {FA, FB}. If the node is in the top
// level graph, the `original_func` is empty. This information, with the
// `original_node_names` can be used to map errors originating at the
// current ndoe to some top level source code.
repeated string original_func_names = 2;
};

// This stores debug information associated with the node.
Expand Down
2 changes: 1 addition & 1 deletion src/main/protobuf/tensorflow/core/framework/op_def.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "tensorflow/core/framework/types.proto";
// LINT.IfChange
message OpDef {
// Op names starting with an underscore are reserved for internal use.
// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
string name = 1;

// For describing inputs and outputs.
Expand Down
12 changes: 12 additions & 0 deletions src/main/protobuf/tensorflow/core/framework/resource_handle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ option java_multiple_files = true;
option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";

import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";

// Protocol buffer representing a handle to a tensorflow resource. Handles are
// not valid across executions, but can be serialized back and forth from within
// a single run.
Expand All @@ -27,4 +30,13 @@ message ResourceHandleProto {
// For debug-only, the name of the type pointed to by this handle, if
// available.
string maybe_type_name = 5;

// Protocol buffer representing a pair of (data type, tensor shape).
message DtypeAndShape {
DataType dtype = 1;
TensorShapeProto shape = 2;
}

// Data types and shapes for the underlying resource.
repeated DtypeAndShape dtypes_and_shapes = 6;
};
2 changes: 1 addition & 1 deletion src/main/protobuf/tensorflow/core/framework/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ enum DataType {
DT_UINT64_REF = 123;
}
// LINT.ThenChange(
// https://www.tensorflow.org/code/tensorflow/c/c_api.h,
// https://www.tensorflow.org/code/tensorflow/c/tf_datatype.h,
// https://www.tensorflow.org/code/tensorflow/go/tensor.go,
// https://www.tensorflow.org/code/tensorflow/core/framework/tensor.cc,
// https://www.tensorflow.org/code/tensorflow/core/framework/types.h,
Expand Down
2 changes: 1 addition & 1 deletion src/main/protobuf/tensorflow/core/framework/variable.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ option java_outer_classname = "VariableProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.framework";

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

// Indicates when a distributed variable will be synced.
enum VariableSynchronization {
Expand Down