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