From 9eb099ded21b5e0a6f108950c225652ea33ef2ad Mon Sep 17 00:00:00 2001 From: Jorg Doku Date: Thu, 31 Aug 2023 14:42:18 -0500 Subject: [PATCH] fix bug --- src/handler.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/handler.py b/src/handler.py index c36a375..a1f4c8f 100644 --- a/src/handler.py +++ b/src/handler.py @@ -222,14 +222,7 @@ async def handler_streaming(job: dict) -> Generator[dict[str, list], None, None] # Store the scenario type and stream index runpod_metrics['scenario'] = 'stream' - runpod_metrics['stream_index'] = tracker.positions['stream_index'] - - # Update positions and stream index - for idx, output in enumerate(request_output.outputs): - tracker.positions[idx] = { - 'chunk_pos': len(output.text.split(" ")), - 'token_pos': len(output.token_ids) - } + runpod_metrics['stream_index'] = tracker.stream_index # Increment the index within the stream tracker.inc_stream_idx()