1syntax = "proto3"; 2 3package tensorflow; 4 5import "tensorflow/core/framework/summary.proto"; 6 7option cc_enable_arenas = true; 8option java_outer_classname = "EventProtos"; 9option java_multiple_files = true; 10option java_package = "org.tensorflow.util"; 11option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/util/event_go_proto"; 12 13// Protocol buffer representing an event that happened during 14// the execution of a Brain model. 15message Event { 16 // Timestamp of the event. 17 double wall_time = 1; 18 19 // Global step of the event. 20 int64 step = 2; 21 22 oneof what { 23 // An event file was started, with the specified version. 24 // This is use to identify the contents of the record IO files 25 // easily. Current version is "brain.Event:2". All versions 26 // start with "brain.Event:". 27 string file_version = 3; 28 // An encoded version of a GraphDef. 29 bytes graph_def = 4; 30 // A summary was generated. 31 Summary summary = 5; 32 // The user output a log message. This was theoretically used by the defunct 33 // tensorboard_logging module, which has since been removed; this field is 34 // now deprecated and should not be used. 35 LogMessage log_message = 6 [deprecated = true]; 36 // The state of the session which can be used for restarting after crashes. 37 SessionLog session_log = 7; 38 // The metadata returned by running a session.run() call. 39 TaggedRunMetadata tagged_run_metadata = 8; 40 // An encoded version of a MetaGraphDef. 41 bytes meta_graph_def = 9; 42 } 43} 44 45// Protocol buffer used for logging messages to the events file. 46// 47// This was theoretically used by the defunct tensorboard_logging module, which 48// has been removed; this message is now deprecated and should not be used. 49message LogMessage { 50 option deprecated = true; 51 enum Level { 52 option deprecated = true; 53 UNKNOWN = 0; 54 // Note: The logging level 10 cannot be named DEBUG. Some software 55 // projects compile their C/C++ code with -DDEBUG in debug builds. So the 56 // C++ code generated from this file should not have an identifier named 57 // DEBUG. 58 DEBUGGING = 10; 59 INFO = 20; 60 WARN = 30; 61 ERROR = 40; 62 FATAL = 50; 63 } 64 Level level = 1; 65 string message = 2; 66} 67 68// Protocol buffer used for logging session state. 69message SessionLog { 70 enum SessionStatus { 71 STATUS_UNSPECIFIED = 0; 72 START = 1; 73 STOP = 2; 74 CHECKPOINT = 3; 75 } 76 77 SessionStatus status = 1; 78 // This checkpoint_path contains both the path and filename. 79 string checkpoint_path = 2; 80 string msg = 3; 81} 82 83// For logging the metadata output for a single session.run() call. 84message TaggedRunMetadata { 85 // Tag name associated with this metadata. 86 string tag = 1; 87 // Byte-encoded version of the `RunMetadata` proto in order to allow lazy 88 // deserialization. 89 bytes run_metadata = 2; 90} 91 92// Worker heartbeat messages. Support for these operations is currently 93// internal and expected to change. 94 95// Current health status of a worker. 96enum WorkerHealth { 97 OK = 0; // By default a worker is healthy. 98 RECEIVED_SHUTDOWN_SIGNAL = 1; 99 INTERNAL_ERROR = 2; 100 SHUTTING_DOWN = 3; // Worker has been instructed to shutdown after a timeout. 101} 102 103// Indicates the behavior of the worker when an internal error or shutdown 104// signal is received. 105enum WorkerShutdownMode { 106 DEFAULT = 0; 107 NOT_CONFIGURED = 1; 108 WAIT_FOR_COORDINATOR = 2; 109 SHUTDOWN_AFTER_TIMEOUT = 3; 110} 111 112message WatchdogConfig { 113 int64 timeout_ms = 1; 114} 115 116message RequestedExitCode { 117 int32 exit_code = 1; 118} 119 120message WorkerHeartbeatRequest { 121 WorkerShutdownMode shutdown_mode = 1; 122 WatchdogConfig watchdog_config = 2; 123 RequestedExitCode exit_code = 3; 124} 125 126message WorkerHeartbeatResponse { 127 WorkerHealth health_status = 1; 128 repeated Event worker_log = 2; 129 string hostname = 3; 130} 131