Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Update test

davidmezzetti2dc6b055bcb2
diff --git a/test/python/testonnx.py b/test/python/testonnx.py
index c782785f..ebd75117 100644
--- a/test/python/testonnx.py
+++ b/test/python/testonnx.py
@@ -13,7 +13,7 @@ from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline
from txtai.embeddings import Embeddings
-from txtai.models import OnnxModel
+from txtai.models import Registry
from txtai.pipeline import HFOnnx, HFTrainer, Labels, MLOnnx, Questions
@@ -48,13 +48,9 @@ class TestOnnx(unittest.TestCase):
self._model_mapping = {}
self._modules = {}
- # Export model to ONNX, use default parameters
- onnx = HFOnnx()
- model = OnnxModel(onnx("google/bert_uncased_L-2_H-128_A-2"))
-
# Test lazy auto mapping
mapping = Mapping()
- model.autoadd(mapping, "key", "value")
+ Registry.autoadd(mapping, "key", "value")
# pylint: disable=W0212
self.assertTrue("key" in mapping._config_mapping)