diff --git a/pyproject.toml b/pyproject.toml index 8def0a45c..74c63ba61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,162 +46,21 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", ] dependencies = [ - "requests", - "httpx", - "pydantic<2", - "transformers==4.35.2", - "pandas", - "rank_bm25", - "scikit-learn>=1.3.0", # TF-IDF and metrics - "lazy-imports==0.3.1", # Optional imports - "prompthub-py==4.0.0", - "platformdirs", - - # Utils - "tqdm", # progress bars in model download and training scripts - "networkx", # graphs library - "quantulum3", # quantities extraction from text - "posthog", # telemetry - "tenacity", # retry decorator - "sseclient-py", # server side events for OpenAI streaming - "more_itertools", # utilities - - # Web Retriever - "boilerpy3", - - # Multimodal Embedder haystack/nodes/retriever/multimodal/embedder.py - "Pillow", - - # OpenAI tokenizer - "tiktoken>=0.5.1", - - # Schema validation - "jsonschema", - - # Agent events - "events", - - "requests-cache<1.0.0", -] - -[project.optional-dependencies] -preview = [ - "canals==0.10.1", - "requests", + "canals==0.11.0", + "requests", # needed by canals "pandas", "rank_bm25", "tqdm", "tenacity", "lazy-imports", - "posthog", # telemetry - - "Jinja2", "openai<1.0.0", + "Jinja2", + "posthog", # telemetry "pyyaml", - "more-itertools", # DocumentSplitter -] -inference = [ - "transformers[torch,sentencepiece]==4.35.2", - "sentence-transformers>=2.2.0", # See haystack/nodes/retriever/_embedding_encoder.py, _SentenceTransformersEmbeddingEncoder - "huggingface-hub>=0.5.0", -] -elasticsearch = [ - "farm-haystack[elasticsearch7]", -] -elasticsearch7 = [ - "elasticsearch>=7.17,<8", - "elastic_transport<8" -] -elasticsearch8 = [ - "elasticsearch>=8,<9", - "elastic_transport>=8,<9" -] -sql = [ - "sqlalchemy>=1.4.2,<2", - "sqlalchemy_utils", - "psycopg2-binary; platform_system != 'Windows'", -] -only-faiss = [ - "faiss-cpu>=1.6.3,<=1.7.2", -] -faiss = [ - "farm-haystack[sql,only-faiss]", -] -only-faiss-gpu = [ - "faiss-gpu>=1.6.3,<2", -] -faiss-gpu = [ - "farm-haystack[sql,only-faiss-gpu]", -] -weaviate = [ - "weaviate-client>2", -] -only-pinecone = [ - "pinecone-client>=2.0.11,<3", -] -pinecone = [ - "farm-haystack[sql,only-pinecone]", -] -opensearch = [ - "opensearch-py>=2", -] -docstores = [ - "farm-haystack[elasticsearch,faiss,weaviate,pinecone,opensearch]", -] -docstores-gpu = [ - "farm-haystack[elasticsearch,faiss-gpu,weaviate,pinecone,opensearch]", -] -aws = [ - # first version to support Amazon Bedrock - "boto3>=1.28.57", -] -crawler = [ - "selenium>=4.11.0" -] -preprocessing = [ - "nltk", - "langdetect", # for language classification -] -file-conversion = [ - "azure-ai-formrecognizer>=3.2.0b2", # Microsoft Azure's Form Recognizer service (text and table exctrator) - "python-docx", - "python-pptx", - "tika", # Apache Tika (text & metadata extractor) - "beautifulsoup4", - "markdown", - "python-frontmatter", - "python-magic; platform_system != 'Windows'", # Depends on libmagic: https://pypi.org/project/python-magic/ - "python-magic-bin; platform_system == 'Windows'", # Needs to be installed without python-magic, otherwise Windows CI gets stuck. -] -pdf = [ - "PyMuPDF>=1.18.16" , # PDF text extraction alternative to xpdf; please check AGPLv3 license -] -ocr = [ - "pytesseract>0.3.7", - "pdf2image>1.14", -] -onnx = [ - "onnxruntime", - "onnxruntime_tools", -] -onnx-gpu = [ - "onnxruntime-gpu", - "onnxruntime_tools", -] -metrics = [ # for metrics - "scipy>=1.3.2", - "rapidfuzz>=2.0.15,<2.8.0", # FIXME https://github.com/deepset-ai/haystack/pull/3199 - "seqeval", - "mlflow", -] -ray = [ - "ray[serve]>=1.9.1,<2; platform_system != 'Windows'", - "ray[serve]>=1.9.1,<2,!=1.12.0; platform_system == 'Windows'", # Avoid 1.12.0 due to https://github.com/ray-project/ray/issues/24169 (fails on windows) - "aiorwlock>=1.3.0,<2", -] -colab = [ - "pillow<=9.0.0", + "more-itertools", # TextDocumentSplitter ] + +[project.optional-dependencies] dev = [ "pre-commit", # Type check @@ -218,7 +77,6 @@ dev = [ "psutil", # Linting "pylint", - "farm-haystack[formatting]", # Documentation "toml", "reno", @@ -226,9 +84,6 @@ dev = [ # We pin it here to avoid taking too much time. # https://opendev.org/openstack/reno/src/branch/master/requirements.txt#L7 "dulwich>=0.21.0,<1.0.0", -] - -formatting = [ # Version specified following Black stability policy: # https://black.readthedocs.io/en/stable/the_black_code_style/index.html#stability-policy "black[jupyter]~=23.0", @@ -238,17 +93,6 @@ audio = [ "openai-whisper>=20231106" ] -all = [ - "farm-haystack[inference,docstores,crawler,preprocessing,file-conversion,pdf,ocr,metrics,aws,preview,audio]", -] -all-gpu = [ - # beir is incompatible with faiss-gpu: https://github.com/beir-cellar/beir/issues/71 - "farm-haystack[inference,docstores-gpu,crawler,preprocessing,file-conversion,pdf,ocr,metrics,aws,preview,audio]", -] - -[project.scripts] -haystack = "haystack.cli.entry_point:main" - [project.urls] "CI: GitHub" = "https://github.com/deepset-ai/haystack/actions" "Docs: RTD" = "https://haystack.deepset.ai/overview/intro"