mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-27 23:12:58 +00:00
Embeddings: HF model hub support added via transformers (#1154)
This commit is contained in:
committed by
Weston Pace
parent
ac63d4066b
commit
1c41a00d87
@@ -45,7 +45,7 @@ except Exception:
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
@pytest.mark.parametrize("alias", ["sentence-transformers", "openai"])
|
||||
@pytest.mark.parametrize("alias", ["sentence-transformers", "openai", "huggingface"])
|
||||
def test_basic_text_embeddings(alias, tmp_path):
|
||||
db = lancedb.connect(tmp_path)
|
||||
registry = get_registry()
|
||||
@@ -84,7 +84,7 @@ def test_basic_text_embeddings(alias, tmp_path):
|
||||
)
|
||||
)
|
||||
|
||||
query = "greetings"
|
||||
query = "greeting"
|
||||
actual = (
|
||||
table.search(query, vector_column_name="vector").limit(1).to_pydantic(Words)[0]
|
||||
)
|
||||
@@ -184,9 +184,9 @@ def test_imagebind(tmp_path):
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
import lancedb.embeddings.imagebind
|
||||
import pandas as pd
|
||||
import requests
|
||||
|
||||
from lancedb.embeddings import get_registry
|
||||
from lancedb.pydantic import LanceModel, Vector
|
||||
|
||||
@@ -321,8 +321,6 @@ def test_gemini_embedding(tmp_path):
|
||||
)
|
||||
@pytest.mark.slow
|
||||
def test_gte_embedding(tmp_path):
|
||||
import lancedb.embeddings.gte
|
||||
|
||||
model = get_registry().get("gte-text").create()
|
||||
|
||||
class TextModel(LanceModel):
|
||||
|
||||
Reference in New Issue
Block a user