|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +option cc_enable_arenas = true; |
| 4 | + |
| 5 | +import "tensorflow_serving/apis/model.proto"; |
| 6 | +import "tensorflow_serving/util/status.proto"; |
| 7 | + |
| 8 | +package tensorflow.serving; |
| 9 | + |
| 10 | +// GetModelStatusRequest contains a ModelSpec indicating the model for which |
| 11 | +// to get status. |
| 12 | +message GetModelStatusRequest { |
| 13 | + // Model Specification. If version is not specified, information about all |
| 14 | + // versions of the model will be returned. If a version is specified, the |
| 15 | + // status of only that version will be returned. |
| 16 | + ModelSpec model_spec = 1; |
| 17 | +} |
| 18 | + |
| 19 | +// Version number, state, and status for a single version of a model. |
| 20 | +message ModelVersionStatus { |
| 21 | + // Model version. |
| 22 | + int64 version = 1; |
| 23 | + |
| 24 | + // States that map to ManagerState enum in |
| 25 | + // tensorflow_serving/core/servable_state.h |
| 26 | + enum State { |
| 27 | + // Default value. |
| 28 | + UNKNOWN = 0; |
| 29 | + |
| 30 | + // The manager is tracking this servable, but has not initiated any action |
| 31 | + // pertaining to it. |
| 32 | + START = 10; |
| 33 | + |
| 34 | + // The manager has decided to load this servable. In particular, checks |
| 35 | + // around resource availability and other aspects have passed, and the |
| 36 | + // manager is about to invoke the loader's Load() method. |
| 37 | + LOADING = 20; |
| 38 | + |
| 39 | + // The manager has successfully loaded this servable and made it available |
| 40 | + // for serving (i.e. GetServableHandle(id) will succeed). To avoid races, |
| 41 | + // this state is not reported until *after* the servable is made |
| 42 | + // available. |
| 43 | + AVAILABLE = 30; |
| 44 | + |
| 45 | + // The manager has decided to make this servable unavailable, and unload |
| 46 | + // it. To avoid races, this state is reported *before* the servable is |
| 47 | + // made unavailable. |
| 48 | + UNLOADING = 40; |
| 49 | + |
| 50 | + // This servable has reached the end of its journey in the manager. Either |
| 51 | + // it loaded and ultimately unloaded successfully, or it hit an error at |
| 52 | + // some point in its lifecycle. |
| 53 | + END = 50; |
| 54 | + } |
| 55 | + |
| 56 | + // Model state. |
| 57 | + State state = 2; |
| 58 | + |
| 59 | + // Model status. |
| 60 | + StatusProto status = 3; |
| 61 | +} |
| 62 | + |
| 63 | +// Response for ModelStatusRequest on successful run. |
| 64 | +message GetModelStatusResponse { |
| 65 | + // Version number and status information for applicable model version(s). |
| 66 | + repeated ModelVersionStatus model_version_status = 1; |
| 67 | +} |
0 commit comments