python312Packages.txtai: 7.4.0 -> 8.0.0

Diff: https://github.com/neuml/txtai/compare/refs/tags/v7.4.0...v8.0.0

Changelog: https://github.com/neuml/txtai/releases/tag/v8.0.0
This commit is contained in:
Gaetan Lepage
2024-10-29 18:28:33 +01:00
parent 130f661d36
commit cd6c2bc48f

View File

@@ -1,10 +1,12 @@
{ {
lib, lib,
buildPythonPackage, buildPythonPackage,
pythonOlder,
fetchFromGitHub, fetchFromGitHub,
# build-system
setuptools, setuptools,
# propagated build input
# dependencies
faiss, faiss,
torch, torch,
transformers, transformers,
@@ -12,61 +14,80 @@
numpy, numpy,
pyyaml, pyyaml,
regex, regex,
# optional-dependencies # optional-dependencies
# ann
annoy,
hnswlib,
pgvector,
sqlalchemy,
sqlite-vec,
# api
aiohttp, aiohttp,
fastapi, fastapi,
uvicorn,
# TODO add apache-libcloud
# , apache-libcloud
rich,
duckdb,
pillow, pillow,
python-multipart,
uvicorn,
# cloud
# apache-libcloud, (unpackaged)
# console
rich,
# database
duckdb,
# graph
# grand-cypher (unpackaged)
# grand-graph (unpackaged)
networkx, networkx,
python-louvain, python-louvain,
# model
onnx, onnx,
onnxruntime, onnxruntime,
# pipeline-audio
# model2vec,
sounddevice,
soundfile, soundfile,
scipy, scipy,
ttstokenizer, ttstokenizer,
webrtcvad,
# pipeline-data
beautifulsoup4, beautifulsoup4,
nltk, nltk,
pandas, pandas,
tika, tika,
# pipeline-image
imagehash, imagehash,
timm, timm,
# pipeline-llm
litellm,
# llama-cpp-python, (unpackaged)
# pipeline-text
fasttext, fasttext,
sentencepiece, sentencepiece,
# pipeline-train
accelerate, accelerate,
bitsandbytes,
onnxmltools, onnxmltools,
annoy, peft,
hnswlib, skl2onnx,
# TODO add pymagnitude-lite # vectors
#, pymagnitude-lite # pymagnitude-lite, (unpackaged)
scikit-learn, scikit-learn,
sentence-transformers, sentence-transformers,
skops,
# workflow
# apache-libcloud (unpackaged)
croniter, croniter,
openpyxl, openpyxl,
requests, requests,
xmltodict, xmltodict,
pgvector,
sqlite-vec, # tests
python-multipart,
# native check inputs
pytestCheckHook,
# check inputs
httpx, httpx,
msgpack, msgpack,
sqlalchemy, pytestCheckHook,
}: }:
let let
version = "7.4.0"; version = "8.0.0";
api = [
aiohttp
fastapi
pillow
python-multipart
uvicorn
];
ann = [ ann = [
annoy annoy
hnswlib hnswlib
@@ -74,30 +95,39 @@ let
sqlalchemy sqlalchemy
sqlite-vec sqlite-vec
]; ];
api = [
aiohttp
fastapi
pillow
python-multipart
uvicorn
];
# cloud = [ apache-libcloud ]; # cloud = [ apache-libcloud ];
console = [ rich ]; console = [ rich ];
database = [ database = [
duckdb duckdb
pillow pillow
sqlalchemy
]; ];
graph = [ graph = [
# grand-cypher
# grand-graph
networkx networkx
python-louvain python-louvain
sqlalchemy
]; ];
model = [ model = [
onnx onnx
onnxruntime onnxruntime
]; ];
pipeline-audio = [ pipeline-audio = [
onnx onnx
onnxruntime onnxruntime
soundfile
scipy scipy
sounddevice
soundfile
ttstokenizer ttstokenizer
webrtcvad
]; ];
pipeline-data = [ pipeline-data = [
beautifulsoup4 beautifulsoup4
@@ -110,25 +140,40 @@ let
pillow pillow
timm timm
]; ];
pipeline-llm = [
litellm
# llama-cpp-python
];
pipeline-text = [ pipeline-text = [
fasttext fasttext
sentencepiece sentencepiece
]; ];
pipeline-train = [ pipeline-train = [
accelerate accelerate
bitsandbytes
onnx onnx
onnxmltools onnxmltools
onnxruntime onnxruntime
peft
skl2onnx
]; ];
pipeline = pipeline-audio ++ pipeline-data ++ pipeline-image ++ pipeline-text ++ pipeline-train; pipeline =
pipeline-audio
similarity = [ ++ pipeline-data
annoy ++ pipeline-image
++ pipeline-llm
++ pipeline-text
++ pipeline-train;
scoring = [ sqlalchemy ];
vectors = [
fasttext fasttext
hnswlib litellm
# llama-cpp-python
# model2vec
# pymagnitude-lite # pymagnitude-lite
scikit-learn scikit-learn
sentence-transformers sentence-transformers
skops
]; ];
workflow = [ workflow = [
# apache-libcloud # apache-libcloud
@@ -139,7 +184,18 @@ let
requests requests
xmltodict xmltodict
]; ];
all = api ++ ann ++ console ++ database ++ graph ++ model ++ pipeline ++ similarity ++ workflow; similarity = ann ++ vectors;
all =
api
++ ann
++ console
++ database
++ graph
++ model
++ pipeline
++ scoring
++ similarity
++ workflow;
optional-dependencies = { optional-dependencies = {
inherit inherit
@@ -151,9 +207,11 @@ let
model model
pipeline-audio pipeline-audio
pipeline-image pipeline-image
pipeline-llm
pipeline-text pipeline-text
pipeline-train pipeline-train
pipeline pipeline
scoring
similarity similarity
workflow workflow
all all
@@ -165,17 +223,14 @@ buildPythonPackage {
inherit version; inherit version;
pyproject = true; pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "neuml"; owner = "neuml";
repo = "txtai"; repo = "txtai";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-DQB12mFUMsKJ8cACowI1Vc7k2n1npdTOQknRmHd5EIM="; hash = "sha256-qhbtKZo0C4OcXdKBGBJhfBMmY0DzbEx6n7d4y4MenN0=";
}; };
buildTools = [ setuptools ]; build-system = [ setuptools ];
pythonRemoveDeps = [ pythonRemoveDeps = [
# We call it faiss, not faiss-cpu. # We call it faiss, not faiss-cpu.
@@ -184,12 +239,13 @@ buildPythonPackage {
dependencies = [ dependencies = [
faiss faiss
torch
transformers
huggingface-hub huggingface-hub
msgpack
numpy numpy
pyyaml pyyaml
regex regex
torch
transformers
]; ];
optional-dependencies = optional-dependencies; optional-dependencies = optional-dependencies;
@@ -203,21 +259,19 @@ buildPythonPackage {
pythonImportsCheck = [ "txtai" ]; pythonImportsCheck = [ "txtai" ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook
] ++ optional-dependencies.ann ++ optional-dependencies.api ++ optional-dependencies.similarity;
checkInputs = [
httpx httpx
msgpack msgpack
pytestCheckHook
python-multipart python-multipart
sqlalchemy sqlalchemy
]; ] ++ optional-dependencies.ann ++ optional-dependencies.api ++ optional-dependencies.similarity;
# The deselected paths depend on the huggingface hub and should be run as a passthru test # The deselected paths depend on the huggingface hub and should be run as a passthru test
# disabledTestPaths won't work as the problem is with the classes containing the tests # disabledTestPaths won't work as the problem is with the classes containing the tests
# (in other words, it fails on __init__) # (in other words, it fails on __init__)
pytestFlagsArray = [ pytestFlagsArray = [
"test/python/test*.py" "test/python/test*.py"
"--deselect=test/python/testagent.py"
"--deselect=test/python/testcloud.py" "--deselect=test/python/testcloud.py"
"--deselect=test/python/testconsole.py" "--deselect=test/python/testconsole.py"
"--deselect=test/python/testembeddings.py" "--deselect=test/python/testembeddings.py"