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. Not all messages are logged, only ones 33 // generated via the Python tensorboard_logging module. 34 LogMessage log_message = 6; 35 // The state of the session which can be used for restarting after crashes. 36 SessionLog session_log = 7; 37 // The metadata returned by running a session.run() call. 38 TaggedRunMetadata tagged_run_metadata = 8; 39 // An encoded version of a MetaGraphDef. 40 bytes meta_graph_def = 9; 41 } 42} 43 44// Protocol buffer used for logging messages to the events file. 45message LogMessage { 46 enum Level { 47 UNKNOWN = 0; 48 // Note: The logging level 10 cannot be named DEBUG. Some software 49 // projects compile their C/C++ code with -DDEBUG in debug builds. So the 50 // C++ code generated from this file should not have an identifier named 51 // DEBUG. 52 DEBUGGING = 10; 53 INFO = 20; 54 WARN = 30; 55 ERROR = 40; 56 FATAL = 50; 57 } 58 Level level = 1; 59 string message = 2; 60} 61 62// Protocol buffer used for logging session state. 63message SessionLog { 64 enum SessionStatus { 65 STATUS_UNSPECIFIED = 0; 66 START = 1; 67 STOP = 2; 68 CHECKPOINT = 3; 69 } 70 71 SessionStatus status = 1; 72 // This checkpoint_path contains both the path and filename. 73 string checkpoint_path = 2; 74 string msg = 3; 75} 76 77// For logging the metadata output for a single session.run() call. 78message TaggedRunMetadata { 79 // Tag name associated with this metadata. 80 string tag = 1; 81 // Byte-encoded version of the `RunMetadata` proto in order to allow lazy 82 // deserialization. 83 bytes run_metadata = 2; 84} 85 86// Worker heartbeat messages. Support for these operations is currently 87// internal and expected to change. 88 89// Current health status of a worker. 90enum WorkerHealth { 91 OK = 0; // By default a worker is healthy. 92 RECEIVED_SHUTDOWN_SIGNAL = 1; 93 INTERNAL_ERROR = 2; 94 SHUTTING_DOWN = 3; // Worker has been instructed to shutdown after a timeout. 95} 96 97// Indicates the behavior of the worker when an internal error or shutdown 98// signal is received. 99enum WorkerShutdownMode { 100 DEFAULT = 0; 101 NOT_CONFIGURED = 1; 102 WAIT_FOR_COORDINATOR = 2; 103 SHUTDOWN_AFTER_TIMEOUT = 3; 104} 105 106message WatchdogConfig { 107 int64 timeout_ms = 1; 108} 109 110message RequestedExitCode { 111 int32 exit_code = 1; 112} 113 114message WorkerHeartbeatRequest { 115 WorkerShutdownMode shutdown_mode = 1; 116 WatchdogConfig watchdog_config = 2; 117 RequestedExitCode exit_code = 3; 118} 119 120message WorkerHeartbeatResponse { 121 WorkerHealth health_status = 1; 122 repeated Event worker_log = 2; 123 string hostname = 3; 124} 125