💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
test: use portable tolerances for cross-batch comparisons
morgan-codedf4472312baed
diff --git a/test/python/testmodels/testpooling.py b/test/python/testmodels/testpooling.pyindex 49896963..06a3ea3d 100644--- a/test/python/testmodels/testpooling.py+++ b/test/python/testmodels/testpooling.py@@ -235,7 +235,7 @@ class TestPooling(unittest.TestCase):centered.center = {"scope": "document"}separate = centered.encode(texts, batch=1, category="data")document = centered.encode(texts, batch=2, category="data")- np.testing.assert_allclose(document, separate, rtol=1e-5, atol=1e-6)+ np.testing.assert_allclose(document, separate, rtol=1e-4, atol=1e-5)def testLemur(self):"""@@ -284,7 +284,7 @@ class TestPooling(unittest.TestCase):# LEMUR must use true token counts, independent of batch paddingsingles = np.vstack([pooling.encode([text], category="data") for text in texts])- np.testing.assert_allclose(documents, singles, rtol=1e-5, atol=1e-6)+ np.testing.assert_allclose(documents, singles, rtol=1e-4, atol=1e-5)# MUVERA remains the default when LEMUR is absentpooling = PoolingFactory.create({"path": model, "device": self.device})