mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-17 20:23:29 +00:00
Fix import in Milvus2DocumentStore to import directly from the file and remove circular import with retriever (#1646)
This commit is contained in:
parent
13510aa753
commit
6f6f2357fd
@ -1,5 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Any, Dict, Generator, List, Optional, Union
|
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Union
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from haystack.nodes.retriever.base import BaseRetriever
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -8,8 +11,7 @@ from scipy.special import expit
|
|||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
from haystack.schema import Document
|
from haystack.schema import Document
|
||||||
from haystack.document_stores import SQLDocumentStore
|
from haystack.document_stores.sql import SQLDocumentStore
|
||||||
from haystack.nodes.retriever.base import BaseRetriever
|
|
||||||
from haystack.document_stores.base import get_batches_from_generator
|
from haystack.document_stores.base import get_batches_from_generator
|
||||||
|
|
||||||
|
|
||||||
@ -341,7 +343,7 @@ class Milvus2DocumentStore(SQLDocumentStore):
|
|||||||
|
|
||||||
def update_embeddings(
|
def update_embeddings(
|
||||||
self,
|
self,
|
||||||
retriever: BaseRetriever,
|
retriever: 'BaseRetriever',
|
||||||
index: Optional[str] = None,
|
index: Optional[str] = None,
|
||||||
batch_size: int = 10_000,
|
batch_size: int = 10_000,
|
||||||
update_existing_embeddings: bool = True,
|
update_existing_embeddings: bool = True,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user