Skip to content

Commit cfac240

Browse files
This is a noop comment update for streaming inputs.
PiperOrigin-RevId: 670773621
1 parent 1149a85 commit cfac240

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

tensorflow_serving/apis/predict.proto

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,45 +71,43 @@ message PredictRequest {
7171
// handled in the stream.
7272
message PredictStreamedOptions {
7373
// Request state used to handle splitting of requests. NONE is the
74-
// default when the stream request is not split.
74+
// default when the stream request is not split and used for a single-turn,
75+
// single request.
7576
//
7677
// SPLIT is used when multiple streamed requests are used to generate a
7778
// logical request. END_SPLIT should be called for the last split of the
78-
// logical request. NONE can not be interspersed with SPLIT before END_SPLIT
79-
// is called. If another request is sent on the same
80-
// stream after END_SPLIT, it can be any of the RequestState since a new
81-
// logical request has started. If END_SPLIT is called on its own the
82-
// behavior is the same as NONE.
79+
// multi-turn request to start the processing of the current turn. NONE can
80+
// not be interspersed with SPLIT and END_SPLIT messages.
81+
// If another request is sent on the same stream after END_SPLIT, it can be
82+
// either SPLIT or END_SPLIT to start accumulating input or trigger the next
83+
// model turn respectively.
8384
//
8485
// Some examples with a mix of request states and the logical request.
8586
//
86-
// Example 1 :
87-
// SPLIT
88-
// SPLIT
89-
// END_SPLIT
87+
// Example 1:
88+
// NONE
9089
//
91-
// Will be treated as a single logical request.
90+
// Single turn, single request.
9291
//
93-
// Example 2:
94-
// NONE
92+
// Example 2 :
9593
// END_SPLIT
96-
// NONE
9794
//
98-
// Will be treated as three logical requests (1. NONE 2. END_SPLIT, 3. NONE)
95+
// Will be treated as a single logical input request for a single turn,
96+
// similar to Example 1.
9997
//
10098
// Example 3:
10199
// SPLIT
102100
// SPLIT
101+
// END_SPLIT
103102
//
104-
// Invalid because END_SPLIT is never call.
103+
// Will be treated as a single logical input request for a single turn,
104+
// similar to Example 1.
105105
//
106106
// Example 4:
107-
// SPLIT
108-
// NONE
109-
// SPLIT
107+
// END_SPLIT
110108
// END_SPLIT
111109
//
112-
// Invalid because is interspersed with SPLIT.
110+
// Will be treated as two logical turn requests (1. END_SPLIT 2. END_SPLIT)
113111
//
114112
// Example 5:
115113
// SPLIT
@@ -118,8 +116,28 @@ message PredictStreamedOptions {
118116
// SPLIT
119117
// END_SPLIT
120118
//
121-
// Will be treated as two logical requests (1. SPLIT, END_SPLIT 2. SPLIT,
119+
// Will be treated as two logical turn requests (1. SPLIT, END_SPLIT 2. SPLIT,
122120
// SPLIT, END_SPLIT)
121+
//
122+
// Incorrect Example 1:
123+
// NONE
124+
// END_SPLIT
125+
//
126+
// Invalid because NONE and END_SPLIT are interspersed.
127+
//
128+
// Incorrect Example 2:
129+
// SPLIT
130+
// SPLIT
131+
//
132+
// Invalid because END_SPLIT is never called.
133+
//
134+
// Incorrect Example 3:
135+
// SPLIT
136+
// NONE
137+
// SPLIT
138+
// END_SPLIT
139+
//
140+
// Invalid because NONE is interspersed with SPLIT/END_SPLIT.
123141

124142
enum RequestState {
125143
NONE = 0;

0 commit comments

Comments
 (0)