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