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