From 8554d1f8275d9b6e3eebaa0c7def5d4b24354c02 Mon Sep 17 00:00:00 2001 From: yuneng Date: Sun, 20 Sep 2026 17:08:16 +0000 Subject: [PATCH] test: prepare reference input before tracing path-sourced peak Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../llms/vertex_ai/files/test_vertex_ai_files_streaming.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py b/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py index a824a1b75d9..29eaf38b427 100644 --- a/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py +++ b/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py @@ -347,8 +347,9 @@ class TestPathSourcedStreaming: def test_path_source_peak_stays_below_list_pipeline(self, tmp_path): cfg = VertexAIFilesConfig() - path, _ = self._write_jsonl(tmp_path, 8000) + path, raw = self._write_jsonl(tmp_path, 8000) data = self._batch_request(path) + content_str = raw.decode("utf-8") def drain_stream(): cfg.get_complete_file_url( @@ -366,9 +367,7 @@ class TestPathSourcedStreaming: pass streaming_peak = _measure_peak(drain_stream) - list_peak = _measure_peak( - lambda: _reference_vertex_jsonl_string(cfg, path.read_bytes().decode("utf-8")) - ) + list_peak = _measure_peak(lambda: _reference_vertex_jsonl_string(cfg, content_str)) assert streaming_peak < list_peak * 0.3, ( f"path-sourced streaming peak {streaming_peak} not a clear win over list pipeline "