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