Skip to content

Commit

Permalink
update tensorflow protos
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyajones committed May 4, 2023
1 parent e166112 commit 78fa64f
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tensorboard/compat/proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,17 @@ tb_proto_library(
],
)

tb_proto_library(
name = "graph_debug_info",
srcs = ["graph_debug_info.proto"],
)

tb_proto_library(
name = "graph",
srcs = ["graph.proto"],
deps = [
":function",
":graph_debug_info",
":node_def",
":versions",
],
Expand Down Expand Up @@ -326,6 +332,7 @@ tb_proto_library(
":full_type",
":function",
":graph",
":graph_debug_info",
":histogram",
":meta_graph",
":node_def",
Expand Down
4 changes: 3 additions & 1 deletion tensorboard/compat/proto/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,9 @@ message ConfigProto {
// aims to negate its value.
bool disable_optimize_for_static_graph = 24;

// Next: 25
reserved 25;

// Next: 26
}

Experimental experimental = 16;
Expand Down
5 changes: 5 additions & 0 deletions tensorboard/compat/proto/coordination_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ message CoordinationServiceConfig {
// If empty, no jobs will be recoverable and every task failure will cause
// error propagation to other tasks.
repeated string recoverable_jobs = 9;

// If a task restarts with a new incarnation, we may allow it to reconnect
// silently. This is useful when we know that a task can immediately resume
// work upon re-connecting to the service.
bool allow_new_incarnation_to_reconnect = 11;
}
4 changes: 4 additions & 0 deletions tensorboard/compat/proto/graph.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package tensorboard;

import "tensorboard/compat/proto/function.proto";
import "tensorboard/compat/proto/graph_debug_info.proto";
import "tensorboard/compat/proto/node_def.proto";
import "tensorboard/compat/proto/versions.proto";

Expand Down Expand Up @@ -53,4 +54,7 @@ message GraphDef {
// consumer does not start until all return values of the callee
// function are ready.
FunctionDefLibrary library = 2;

// Stack traces for the nodes in this graph.
GraphDebugInfo debug_info = 5;
}
52 changes: 52 additions & 0 deletions tensorboard/compat/proto/graph_debug_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
syntax = "proto3";

package tensorboard;

option cc_enable_arenas = true;
option java_outer_classname = "GraphDebugInfoProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";

message GraphDebugInfo {
// This represents a file/line location in the source code.
message FileLineCol {
// File name index, which can be used to retrieve the file name string from
// `files`. The value should be between 0 and (len(files)-1)
int32 file_index = 1;

// Line number in the file.
int32 line = 2;

// Col number in the file line.
int32 col = 3;

// Name of function contains the file line.
string func = 4;

// Source code contained in this file line.
string code = 5;
}

// This represents a stack trace which is a ordered list of `FileLineCol`.
message StackTrace {
// Each line in the stack trace.
repeated FileLineCol file_line_cols = 1;
}

// This stores all the source code file names and can be indexed by the
// `file_index`.
repeated string files = 1;

// This maps a node name to a stack trace in the source code.
// The map key is a mangling of the containing function and op name with
// syntax:
// op.name '@' func_name
// For ops in the top-level graph, the func_name is the empty string.
// Note that op names are restricted to a small number of characters which
// exclude '@', making it impossible to collide keys of this form. Function
// names accept a much wider set of characters.
// It would be preferable to avoid mangling and use a tuple key of (op.name,
// func_name), but this is not supported with protocol buffers.
map<string, StackTrace> traces = 2;
}
4 changes: 4 additions & 0 deletions tensorboard/compat/proto/proto_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
"tensorflow.core.framework.function_pb2",
"tensorboard.compat.proto.function_pb2",
),
(
"tensorflow.core.framework.graph_debug_info_pb2",
"tensorboard.compat.proto.graph_debug_info_pb2",
),
(
"tensorflow.core.framework.graph_pb2",
"tensorboard.compat.proto.graph_pb2",
Expand Down
2 changes: 2 additions & 0 deletions tensorboard/compat/proto/struct.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ message StructuredValue {
DictValue dict_value = 53;
// Represents Python's namedtuple.
NamedTupleValue named_tuple_value = 54;
// Represents a value for tf.Tensor.
tensorboard.TensorProto tensor_value = 55;
}
}

Expand Down

0 comments on commit 78fa64f

Please sign in to comment.