💡 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
Reduce number of vector process indexers for unit test
davidmezzettid646ca70c869
diff --git a/test/python/testpipeline/testtranslation.py b/test/python/testpipeline/testtranslation.pyindex d76857e2..f301e8e7 100644--- a/test/python/testpipeline/testtranslation.py+++ b/test/python/testpipeline/testtranslation.py@@ -3,7 +3,6 @@ Translation module tests"""import os-import platformimport unittestfrom txtai.pipeline import Translation@@ -27,7 +26,7 @@ class TestTranslation(unittest.TestCase):# Validate translation textself.assertIsNotNone(translation)- @unittest.skipIf(os.name == "nt" or platform.system() == "Darwin", "M2M100 skipped on Windows and macOS")+ @unittest.skipIf(os.name == "nt", "M2M100 skipped on Windows")def testM2M100Translation(self):"""Tests a translation using M2M100 modelsdiff --git a/test/python/testvectors/testwordvectors.py b/test/python/testvectors/testwordvectors.pyindex 269c4ad7..35a48959 100644--- a/test/python/testvectors/testwordvectors.py+++ b/test/python/testvectors/testwordvectors.py@@ -6,6 +6,8 @@ import osimport tempfileimport unittest+from unittest.mock import patch+from txtai.vectors import WordVectors, VectorsFactory@@ -45,11 +47,15 @@ class TestWordVectors(unittest.TestCase):self.assertTrue(model.initialized)- def testIndex(self):+ @patch(os.cpu_count)+ def testIndex(self, cpucount):"""Test word vector indexing"""+ # Mock CPU count+ cpucount.return_value = 2+# Generate datadocuments = [(x, "This is a test", None) for x in range(1000)]