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