mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-26 00:24:14 +00:00
Remove conditional import of FAISS for Windows (#819)
This commit is contained in:
parent
a1983ad84e
commit
8b0031bfc1
@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
from sys import platform
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union, List, Optional, Dict, Generator
|
from typing import Union, List, Optional, Dict, Generator
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
import faiss
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from haystack import Document
|
from haystack import Document
|
||||||
@ -11,10 +11,6 @@ from haystack.retriever.base import BaseRetriever
|
|||||||
from haystack.utils import get_batches_from_generator
|
from haystack.utils import get_batches_from_generator
|
||||||
from scipy.special import expit
|
from scipy.special import expit
|
||||||
|
|
||||||
if platform != 'win32' and platform != 'cygwin':
|
|
||||||
import faiss
|
|
||||||
else:
|
|
||||||
raise ModuleNotFoundError("FAISSDocumentStore on windows platform is not supported")
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ python-multipart
|
|||||||
python-docx
|
python-docx
|
||||||
sqlalchemy_utils
|
sqlalchemy_utils
|
||||||
# for using FAISS with GPUs, install faiss-gpu
|
# for using FAISS with GPUs, install faiss-gpu
|
||||||
faiss-cpu==1.6.3; sys_platform != 'win32' and sys_platform != 'cygwin'
|
faiss-cpu==1.6.3
|
||||||
tika
|
tika
|
||||||
uvloop==0.14; sys_platform != 'win32' and sys_platform != 'cygwin'
|
uvloop==0.14; sys_platform != 'win32' and sys_platform != 'cygwin'
|
||||||
httptools
|
httptools
|
||||||
|
Loading…
x
Reference in New Issue
Block a user