• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow;
4
5option cc_enable_arenas = true;
6option java_outer_classname = "DebugProtos";
7option java_multiple_files = true;
8option java_package = "org.tensorflow.framework";
9option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
10
11// Option for watching a node in TensorFlow Debugger (tfdbg).
12message DebugTensorWatch {
13  // Name of the node to watch.
14  // Use "*" for wildcard. But note: currently, regex is not supported in
15  // general.
16  string node_name = 1;
17
18  // Output slot to watch.
19  // The semantics of output_slot == -1 is that all outputs of the node
20  // will be watched (i.e., a wildcard).
21  // Other negative values of output_slot are invalid and will lead to
22  // errors currently.
23  int32 output_slot = 2;
24
25  // Name(s) of the debugging op(s).
26  // One or more than one probes on a tensor.
27  // e.g., {"DebugIdentity", "DebugNanCount"}
28  repeated string debug_ops = 3;
29
30  // URL(s) for debug targets(s).
31  //
32  // Supported URL formats are:
33  //   - file:///foo/tfdbg_dump: Writes out Event content to file
34  //     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
35  //     already exist.
36  //   - grpc://localhost:11011: Sends an RPC request to an EventListener
37  //     service running at localhost:11011 with the event.
38  //   - memcbk:///event_key: Routes tensors to clients using the
39  //     callback registered with the DebugCallbackRegistry for event_key.
40  //
41  // Each debug op listed in debug_ops will publish its output tensor (debug
42  // signal) to all URLs in debug_urls.
43  //
44  // N.B. Session::Run() supports concurrent invocations of the same inputs
45  // (feed keys), outputs and target nodes. If such concurrent invocations
46  // are to be debugged, the callers of Session::Run() must use distinct
47  // debug_urls to make sure that the streamed or dumped events do not overlap
48  // among the invocations.
49  // TODO(cais): More visible documentation of this in g3docs.
50  repeated string debug_urls = 4;
51
52  // Do not error out if debug op creation fails (e.g., due to dtype
53  // incompatibility). Instead, just log the failure.
54  bool tolerate_debug_op_creation_failures = 5;
55}
56
57// Options for initializing DebuggerState in TensorFlow Debugger (tfdbg).
58message DebugOptions {
59  // Debugging options
60  repeated DebugTensorWatch debug_tensor_watch_opts = 4;
61
62  // Caller-specified global step count.
63  // Note that this is distinct from the session run count and the executor
64  // step count.
65  int64 global_step = 10;
66
67  // Whether the total disk usage of tfdbg is to be reset to zero
68  // in this Session.run call. This is used by wrappers and hooks
69  // such as the local CLI ones to indicate that the dumped tensors
70  // are cleaned up from the disk after each Session.run.
71  bool reset_disk_byte_usage = 11;
72}
73
74message DebuggedSourceFile {
75  // The host name on which a source code file is located.
76  string host = 1;
77
78  // Path to the source code file.
79  string file_path = 2;
80
81  // The timestamp at which the source code file is last modified.
82  int64 last_modified = 3;
83
84  // Byte size of the file.
85  int64 bytes = 4;
86
87  // Line-by-line content of the source code file.
88  repeated string lines = 5;
89}
90
91message DebuggedSourceFiles {
92  // A collection of source code files.
93  repeated DebuggedSourceFile source_files = 1;
94}
95