fix aggre

This commit is contained in:
Jorg Doku
2023-09-05 23:51:35 -05:00
parent 871196dafb
commit ba4e6e6df0
+3 -2
View File
@@ -252,9 +252,10 @@ async def handler_streaming(job: dict) -> Generator[dict[str, list], None, None]
# Include metrics in the highest level for the job output for aggregrate.
def aggregate_function(streamed_outputs):
aggregate_output = ""
aggregate_output = [""] * len(streamed_outputs[0]['text'])
for stream in streamed_outputs:
aggregate_output += stream['text']
for id, seq in enumerate(stream['text']):
aggregate_output[id] += seq
# Number of generated sequences
num_seqs = sampling_params.n