Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Sep 25, 2024
1 parent 28adb9f commit 5d9abf8
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest.mock import patch

from haystack.utils.auth import Secret

from haystack_integrations.components.embedders.instructor_embedders.embedding_backend.instructor_backend import (
_InstructorEmbeddingBackendFactory,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest
from haystack import Document
from haystack.utils import ComponentDevice, Secret

from haystack_integrations.components.embedders.instructor_embedders import InstructorDocumentEmbedder


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import pytest
from haystack.utils import ComponentDevice, Secret

from haystack_integrations.components.embedders.instructor_embedders import InstructorTextEmbedder


Expand Down
1 change: 1 addition & 0 deletions integrations/qdrant/examples/embedding_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from haystack.components.embedders import SentenceTransformersDocumentEmbedder, SentenceTransformersTextEmbedder
from haystack.components.preprocessors import DocumentSplitter
from haystack.components.writers import DocumentWriter

from haystack_integrations.components.retrievers.qdrant import QdrantEmbeddingRetriever
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
from haystack.dataclasses.sparse_embedding import SparseEmbedding
from haystack.document_stores.types import FilterPolicy
from haystack.document_stores.types.filter_policy import apply_filter_policy
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
from qdrant_client.http import models

from haystack_integrations.document_stores.qdrant import QdrantDocumentStore


@component
class QdrantEmbeddingRetriever:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import logging
import time

from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
from qdrant_client.http import models

from haystack_integrations.document_stores.qdrant import QdrantDocumentStore

logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.INFO)
Expand Down
3 changes: 2 additions & 1 deletion integrations/qdrant/tests/test_converters.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import numpy as np
from qdrant_client.http import models as rest

from haystack_integrations.document_stores.qdrant.converters import (
convert_id,
convert_qdrant_point_to_haystack_document,
)
from qdrant_client.http import models as rest


def test_convert_id_is_deterministic():
Expand Down
1 change: 1 addition & 0 deletions integrations/qdrant/tests/test_dict_converters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from haystack.utils import Secret

from haystack_integrations.document_stores.qdrant import QdrantDocumentStore


Expand Down
3 changes: 2 additions & 1 deletion integrations/qdrant/tests/test_document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
WriteDocumentsTest,
_random_embeddings,
)
from qdrant_client.http import models as rest

from haystack_integrations.document_stores.qdrant.document_store import (
SPARSE_VECTORS_NAME,
QdrantDocumentStore,
QdrantStoreError,
)
from qdrant_client.http import models as rest


class TestQdrantDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest):
Expand Down
3 changes: 2 additions & 1 deletion integrations/qdrant/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
from haystack import Document
from haystack.testing.document_store import FilterDocumentsTest
from haystack.utils.filters import FilterError
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
from qdrant_client.http import models

from haystack_integrations.document_stores.qdrant import QdrantDocumentStore


class TestQdrantStoreBaseTests(FilterDocumentsTest):
@pytest.fixture
Expand Down
1 change: 1 addition & 0 deletions integrations/qdrant/tests/test_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
FilterableDocsFixtureMixin,
_random_embeddings,
)

from haystack_integrations.components.retrievers.qdrant import (
QdrantEmbeddingRetriever,
QdrantHybridRetriever,
Expand Down

0 comments on commit 5d9abf8

Please sign in to comment.