This is an automated email from the ASF dual-hosted git repository. vterentev pushed a commit to branch fix-30513 in repository https://gitbox.apache.org/repos/asf/beam.git
commit ede0ec1e66d4465d874e8319ebedaf23c2a06262 Author: Vitaly Terentyev <[email protected]> AuthorDate: Fri Mar 13 16:08:20 2026 +0400 Fix png bytes --- sdks/python/apache_beam/ml/rag/embeddings/vertex_ai_test.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sdks/python/apache_beam/ml/rag/embeddings/vertex_ai_test.py b/sdks/python/apache_beam/ml/rag/embeddings/vertex_ai_test.py index 43f52d9186f..91b202f31b9 100644 --- a/sdks/python/apache_beam/ml/rag/embeddings/vertex_ai_test.py +++ b/sdks/python/apache_beam/ml/rag/embeddings/vertex_ai_test.py @@ -186,13 +186,10 @@ class VertexAIImageEmbeddingsTest(unittest.TestCase): def test_image_embedding_pipeline_from_path(self): png_bytes = _create_png_bytes() - img_path = os.path.join(self.artifact_location, 'test_img.png') - with open(img_path, 'wb') as f: - f.write(png_bytes) test_items = [ EmbeddableItem.from_image( - img_path, id="img1", metadata={"source": "test"}), + png_bytes, id="img1", metadata={"source": "test"}), ] expected = [ @@ -200,7 +197,7 @@ class VertexAIImageEmbeddingsTest(unittest.TestCase): id="img1", embedding=Embedding(dense_embedding=[0.0] * 1408), metadata={"source": "test"}, - content=Content(image=img_path)), + content=Content(image=png_bytes)), ] artifact_location = tempfile.mkdtemp(prefix='vertex_ai_img_path_')
