From 0e634eaa9f68edfbf9ebc99e252af13dcfd4d94a Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Wed, 2 Oct 2024 09:50:36 -0700 Subject: [PATCH] Update text embedder test to match the output after XNNPack upgrade. PiperOrigin-RevId: 681489960 --- mediapipe/tasks/python/test/text/text_embedder_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mediapipe/tasks/python/test/text/text_embedder_test.py b/mediapipe/tasks/python/test/text/text_embedder_test.py index e91642dc3a..028cc57d42 100644 --- a/mediapipe/tasks/python/test/text/text_embedder_test.py +++ b/mediapipe/tasks/python/test/text/text_embedder_test.py @@ -110,7 +110,7 @@ def _check_cosine_similarity(self, result0, result1, expected_similarity): ModelFileType.FILE_NAME, 0.965793, 512, - (21.1785, 20.32263), + (21.2054, 20.32263), ), ( True, @@ -119,7 +119,7 @@ def _check_cosine_similarity(self, result0, result1, expected_similarity): ModelFileType.FILE_NAME, 0.965793, 512, - (0.062262, 0.065280), + (0.062578, 0.065280), ), ( False, @@ -203,7 +203,7 @@ def test_embed(self, l2_normalize, quantize, model_name, model_file_type, ModelFileType.FILE_NAME, 0.965793, 512, - (21.1785, 20.322639), + (21.2054, 20.322639), ), ( True, @@ -212,7 +212,7 @@ def test_embed(self, l2_normalize, quantize, model_name, model_file_type, ModelFileType.FILE_NAME, 0.965793, 512, - (0.0622627, 0.065280), + (0.0625787, 0.065280), ), ( False, @@ -287,7 +287,7 @@ def test_embed_in_context(self, l2_normalize, quantize, model_name, @parameterized.parameters( # TODO: The similarity should likely be lower - (_BERT_MODEL_FILE, 0.97564), + (_BERT_MODEL_FILE, 0.99025), (_USE_MODEL_FILE, 0.780334), ) def test_embed_with_different_themes(self, model_file, expected_similarity):