mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-01 20:33:48 +00:00
Adjust requirements for Windows (#480)
This commit is contained in:
parent
3caaf99dcb
commit
12c4dd7b4b
@ -1,17 +1,22 @@
|
|||||||
import logging
|
import logging
|
||||||
|
from sys import platform
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union, List, Optional, Dict
|
from typing import Union, List, Optional, Dict
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
import faiss
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import random
|
|
||||||
|
|
||||||
from haystack import Document
|
from haystack import Document
|
||||||
from haystack.document_store.sql import SQLDocumentStore
|
from haystack.document_store.sql import SQLDocumentStore
|
||||||
from haystack.retriever.base import BaseRetriever
|
from haystack.retriever.base import BaseRetriever
|
||||||
|
|
||||||
|
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__)
|
||||||
|
|
||||||
|
|
||||||
class FAISSDocumentStore(SQLDocumentStore):
|
class FAISSDocumentStore(SQLDocumentStore):
|
||||||
"""
|
"""
|
||||||
Document store for very large scale embedding based dense retrievers like the DPR.
|
Document store for very large scale embedding based dense retrievers like the DPR.
|
||||||
|
@ -4,7 +4,6 @@ fastapi
|
|||||||
uvicorn
|
uvicorn
|
||||||
gunicorn
|
gunicorn
|
||||||
pandas
|
pandas
|
||||||
psycopg2-binary
|
|
||||||
sklearn
|
sklearn
|
||||||
elasticsearch
|
elasticsearch
|
||||||
elastic-apm
|
elastic-apm
|
||||||
@ -16,7 +15,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
|
faiss-cpu; sys_platform != 'win32' and sys_platform != 'cygwin'
|
||||||
tika
|
tika
|
||||||
uvloop
|
uvloop; sys_platform != 'win32' and sys_platform != 'cygwin'
|
||||||
httptools
|
httptools
|
||||||
|
Loading…
x
Reference in New Issue
Block a user