diff --git a/integrations/instructor_embedders/tests/test_instructor_backend.py b/integrations/instructor_embedders/tests/test_instructor_backend.py index 85c1f012a..fdf6e44be 100644 --- a/integrations/instructor_embedders/tests/test_instructor_backend.py +++ b/integrations/instructor_embedders/tests/test_instructor_backend.py @@ -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, ) diff --git a/integrations/instructor_embedders/tests/test_instructor_document_embedder.py b/integrations/instructor_embedders/tests/test_instructor_document_embedder.py index 44f740679..f1676b411 100644 --- a/integrations/instructor_embedders/tests/test_instructor_document_embedder.py +++ b/integrations/instructor_embedders/tests/test_instructor_document_embedder.py @@ -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 diff --git a/integrations/instructor_embedders/tests/test_instructor_text_embedder.py b/integrations/instructor_embedders/tests/test_instructor_text_embedder.py index 55022f1ec..68e3e5d62 100644 --- a/integrations/instructor_embedders/tests/test_instructor_text_embedder.py +++ b/integrations/instructor_embedders/tests/test_instructor_text_embedder.py @@ -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 diff --git a/integrations/qdrant/examples/embedding_retrieval.py b/integrations/qdrant/examples/embedding_retrieval.py index f009191e7..84f12f4fe 100644 --- a/integrations/qdrant/examples/embedding_retrieval.py +++ b/integrations/qdrant/examples/embedding_retrieval.py @@ -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 diff --git a/integrations/qdrant/src/haystack_integrations/components/retrievers/qdrant/retriever.py b/integrations/qdrant/src/haystack_integrations/components/retrievers/qdrant/retriever.py index 334df9bb8..fee9a6182 100644 --- a/integrations/qdrant/src/haystack_integrations/components/retrievers/qdrant/retriever.py +++ b/integrations/qdrant/src/haystack_integrations/components/retrievers/qdrant/retriever.py @@ -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: diff --git a/integrations/qdrant/src/haystack_integrations/document_stores/qdrant/migrate_to_sparse.py b/integrations/qdrant/src/haystack_integrations/document_stores/qdrant/migrate_to_sparse.py index 1fabbfd9c..9eb4ca088 100644 --- a/integrations/qdrant/src/haystack_integrations/document_stores/qdrant/migrate_to_sparse.py +++ b/integrations/qdrant/src/haystack_integrations/document_stores/qdrant/migrate_to_sparse.py @@ -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) diff --git a/integrations/qdrant/tests/test_converters.py b/integrations/qdrant/tests/test_converters.py index 242c4cafe..566da49ab 100644 --- a/integrations/qdrant/tests/test_converters.py +++ b/integrations/qdrant/tests/test_converters.py @@ -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(): diff --git a/integrations/qdrant/tests/test_dict_converters.py b/integrations/qdrant/tests/test_dict_converters.py index 3871dbff0..8ea5b5595 100644 --- a/integrations/qdrant/tests/test_dict_converters.py +++ b/integrations/qdrant/tests/test_dict_converters.py @@ -1,4 +1,5 @@ from haystack.utils import Secret + from haystack_integrations.document_stores.qdrant import QdrantDocumentStore diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index fc777e4c7..79523531b 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -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): diff --git a/integrations/qdrant/tests/test_filters.py b/integrations/qdrant/tests/test_filters.py index fd070bda9..1afd2b7f3 100644 --- a/integrations/qdrant/tests/test_filters.py +++ b/integrations/qdrant/tests/test_filters.py @@ -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 diff --git a/integrations/qdrant/tests/test_retriever.py b/integrations/qdrant/tests/test_retriever.py index 426423d5d..bd6b92842 100644 --- a/integrations/qdrant/tests/test_retriever.py +++ b/integrations/qdrant/tests/test_retriever.py @@ -8,6 +8,7 @@ FilterableDocsFixtureMixin, _random_embeddings, ) + from haystack_integrations.components.retrievers.qdrant import ( QdrantEmbeddingRetriever, QdrantHybridRetriever,