File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -128,19 +128,18 @@ def process_queries(self):
128
128
pred_output_tokens ,
129
129
query_id_list = query_ids ,
130
130
)
131
-
132
- for i in range (len (qitem )):
133
- n_tokens = processed_output [i ].shape [0 ]
134
- response_array = array .array (
135
- "B" , processed_output [i ].tobytes ())
136
- bi = response_array .buffer_info ()
137
- response = [
138
- lg .QuerySampleResponse (
139
- qitem [i ].id ,
140
- bi [0 ],
141
- bi [1 ],
142
- n_tokens )]
143
- lg .QuerySamplesComplete (response )
131
+ for i in range (len (qitem )):
132
+ n_tokens = processed_output [i ].shape [0 ]
133
+ response_array = array .array (
134
+ "B" , processed_output [i ].tobytes ())
135
+ bi = response_array .buffer_info ()
136
+ response = [
137
+ lg .QuerySampleResponse (
138
+ qitem [i ].id ,
139
+ bi [0 ],
140
+ bi [1 ],
141
+ n_tokens )]
142
+ lg .QuerySamplesComplete (response )
144
143
145
144
tok = time .time ()
146
145
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ def postProcess(
80
80
output_seq = out_tokens
81
81
assert len (query_id_list ) == len (output_seq )
82
82
83
- return np .asarray (output_seq , dtype = np .int32 )
83
+ return [ np .asarray (out , dtype = np .int32 ) for out in output_seq ]
84
84
85
85
def LoadSamplesToRam (self , sample_list ):
86
86
pass
You can’t perform that action at this time.
0 commit comments