python3Packages.chromadb: 0.6.3 -> 1.0.12
release notes: https://github.com/chroma-core/chroma/releases/tag/1.0.12
This commit is contained in:
parent
23d0f1537a
commit
61265017a3
@ -3,10 +3,7 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
fetchurl,
|
||||||
# build-system
|
|
||||||
setuptools-scm,
|
|
||||||
setuptools,
|
|
||||||
|
|
||||||
# build inputs
|
# build inputs
|
||||||
cargo,
|
cargo,
|
||||||
@ -14,6 +11,7 @@
|
|||||||
protobuf,
|
protobuf,
|
||||||
rustc,
|
rustc,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
|
pkgs, # zstd hidden by python3Packages.zstd
|
||||||
openssl,
|
openssl,
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
@ -23,6 +21,7 @@
|
|||||||
grpcio,
|
grpcio,
|
||||||
httpx,
|
httpx,
|
||||||
importlib-resources,
|
importlib-resources,
|
||||||
|
jsonschema,
|
||||||
kubernetes,
|
kubernetes,
|
||||||
mmh3,
|
mmh3,
|
||||||
numpy,
|
numpy,
|
||||||
@ -45,16 +44,20 @@
|
|||||||
typer,
|
typer,
|
||||||
typing-extensions,
|
typing-extensions,
|
||||||
uvicorn,
|
uvicorn,
|
||||||
zstd,
|
|
||||||
|
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
chroma-hnswlib,
|
chroma-hnswlib,
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
|
hnswlib,
|
||||||
hypothesis,
|
hypothesis,
|
||||||
|
pandas,
|
||||||
psutil,
|
psutil,
|
||||||
pytest-asyncio,
|
pytest-asyncio,
|
||||||
|
pytest-xdist,
|
||||||
pytestCheckHook,
|
pytestCheckHook,
|
||||||
|
sqlite,
|
||||||
|
starlette,
|
||||||
|
|
||||||
# passthru
|
# passthru
|
||||||
nixosTests,
|
nixosTests,
|
||||||
@ -63,31 +66,45 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "chromadb";
|
pname = "chromadb";
|
||||||
version = "0.6.3";
|
version = "1.0.12";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "chroma-core";
|
owner = "chroma-core";
|
||||||
repo = "chroma";
|
repo = "chroma";
|
||||||
tag = version;
|
tag = version;
|
||||||
hash = "sha256-yvAX8buETsdPvMQmRK5+WFz4fVaGIdNlfhSadtHwU5U=";
|
hash = "sha256-Q4PhJTRNzJeVx6DIPWirnI9KksNb8vfOtqb/q9tSK3c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
inherit src;
|
inherit src;
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}-vendor";
|
||||||
hash = "sha256-lHRBXJa/OFNf4x7afEJw9XcuDveTBIy3XpQ3+19JXn4=";
|
hash = "sha256-+Ea2aRrsBGfVCLdOF41jeMehJhMurc8d0UKrpR6ndag=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Can't use fetchFromGitHub as the build expects a zipfile
|
||||||
|
swagger-ui = fetchurl {
|
||||||
|
url = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.22.0.zip";
|
||||||
|
hash = "sha256-H+kXxA/6rKzYA19v7Zlx2HbIg/DGicD5FDIs0noVGSk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# The fastapi servers can't set up their networking in the test environment, so disable for testing
|
||||||
|
./disable-fastapi-fixtures.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# Nixpkgs is taking the version from `chromadb_rust_bindings` which is versioned independently
|
||||||
|
substituteInPlace pyproject.toml \
|
||||||
|
--replace-fail "dynamic = [\"version\"]" "version = \"${version}\""
|
||||||
|
'';
|
||||||
|
|
||||||
pythonRelaxDeps = [
|
pythonRelaxDeps = [
|
||||||
"chroma-hnswlib"
|
"fastapi"
|
||||||
"orjson"
|
|
||||||
"tokenizers"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
build-system = [
|
build-system = [
|
||||||
setuptools
|
rustPlatform.maturinBuildHook
|
||||||
setuptools-scm
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -100,17 +117,17 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
openssl
|
openssl
|
||||||
zstd
|
pkgs.zstd
|
||||||
];
|
];
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
bcrypt
|
bcrypt
|
||||||
build
|
build
|
||||||
chroma-hnswlib
|
|
||||||
fastapi
|
fastapi
|
||||||
grpcio
|
grpcio
|
||||||
httpx
|
httpx
|
||||||
importlib-resources
|
importlib-resources
|
||||||
|
jsonschema
|
||||||
kubernetes
|
kubernetes
|
||||||
mmh3
|
mmh3
|
||||||
numpy
|
numpy
|
||||||
@ -135,11 +152,21 @@ buildPythonPackage rec {
|
|||||||
uvicorn
|
uvicorn
|
||||||
];
|
];
|
||||||
|
|
||||||
|
optional-dependencies = {
|
||||||
|
dev = [ chroma-hnswlib ];
|
||||||
|
};
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
chroma-hnswlib
|
||||||
|
hnswlib
|
||||||
hypothesis
|
hypothesis
|
||||||
|
pandas
|
||||||
psutil
|
psutil
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
|
pytest-xdist
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
|
sqlite
|
||||||
|
starlette
|
||||||
];
|
];
|
||||||
|
|
||||||
# Disable on aarch64-linux due to broken onnxruntime
|
# Disable on aarch64-linux due to broken onnxruntime
|
||||||
@ -151,11 +178,16 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
env = {
|
env = {
|
||||||
ZSTD_SYS_USE_PKG_CONFIG = true;
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
||||||
|
SWAGGER_UI_DOWNLOAD_URL = "file://${swagger-ui}";
|
||||||
};
|
};
|
||||||
|
|
||||||
pytestFlagsArray = [
|
pytestFlagsArray = [
|
||||||
"-x" # these are slow tests, so stop on the first failure
|
"-x" # these are slow tests, so stop on the first failure
|
||||||
"-v"
|
"-v"
|
||||||
|
"-W"
|
||||||
|
"ignore:DeprecationWarning"
|
||||||
|
"-W"
|
||||||
|
"ignore:PytestCollectionWarning"
|
||||||
];
|
];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
@ -173,28 +205,43 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
# httpx ReadError
|
# httpx ReadError
|
||||||
"test_not_existing_collection_delete"
|
"test_not_existing_collection_delete"
|
||||||
|
|
||||||
|
# Tests launch a server and try to connect to it
|
||||||
|
# These either have https connection errors or name resolution errors
|
||||||
|
"test_collection_query_with_invalid_collection_throws"
|
||||||
|
"test_collection_update_with_invalid_collection_throws"
|
||||||
|
"test_default_embedding"
|
||||||
|
"test_invalid_index_params"
|
||||||
|
"test_peek"
|
||||||
|
"test_persist_index_loading"
|
||||||
|
"test_query_id_filtering_e2e"
|
||||||
|
"test_query_id_filtering_medium_dataset"
|
||||||
|
"test_query_id_filtering_small_dataset"
|
||||||
|
"test_ssl_self_signed_without_ssl_verify"
|
||||||
|
"test_ssl_self_signed"
|
||||||
|
|
||||||
|
# Apparent race condition with sqlite
|
||||||
|
# See https://github.com/chroma-core/chroma/issues/4661
|
||||||
|
"test_multithreaded_get_or_create"
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
# Tests require network access
|
# Tests require network access
|
||||||
"chromadb/test/auth/test_simple_rbac_authz.py"
|
"bin/rust_python_compat_test.py"
|
||||||
"chromadb/test/db/test_system.py"
|
"chromadb/test/configurations/test_collection_configuration.py"
|
||||||
"chromadb/test/ef/test_default_ef.py"
|
"chromadb/test/ef/test_default_ef.py"
|
||||||
|
"chromadb/test/ef/test_onnx_mini_lm_l6_v2.py"
|
||||||
|
"chromadb/test/ef/test_voyageai_ef.py"
|
||||||
"chromadb/test/property/"
|
"chromadb/test/property/"
|
||||||
"chromadb/test/property/test_cross_version_persist.py"
|
"chromadb/test/property/test_cross_version_persist.py"
|
||||||
"chromadb/test/stress/"
|
"chromadb/test/stress/"
|
||||||
"chromadb/test/test_api.py"
|
"chromadb/test/test_api.py"
|
||||||
|
|
||||||
# httpx failures
|
# Tests time out (waiting for server)
|
||||||
"chromadb/test/api/test_delete_database.py"
|
"chromadb/test/test_cli.py"
|
||||||
|
|
||||||
# Cannot be loaded by pytest without path hacks (fixed in 1.0.0)
|
# Cannot find protobuf file while loading test
|
||||||
"chromadb/test/test_logservice.py"
|
"chromadb/test/distributed/test_log_failover.py"
|
||||||
"chromadb/test/proto/test_utils.py"
|
|
||||||
"chromadb/test/segment/distributed/test_protobuf_translation.py"
|
|
||||||
|
|
||||||
# Hypothesis FailedHealthCheck due to nested @given tests
|
|
||||||
"chromadb/test/cache/test_cache.py"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
@ -212,17 +259,17 @@ buildPythonPackage rec {
|
|||||||
"([0-9].+)"
|
"([0-9].+)"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "AI-native open-source embedding database";
|
description = "AI-native open-source embedding database";
|
||||||
homepage = "https://github.com/chroma-core/chroma";
|
homepage = "https://github.com/chroma-core/chroma";
|
||||||
changelog = "https://github.com/chroma-core/chroma/releases/tag/${version}";
|
changelog = "https://github.com/chroma-core/chroma/releases/tag/${version}";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
maintainers = with lib.maintainers; [
|
maintainers = with lib.maintainers; [
|
||||||
fab
|
fab
|
||||||
sarahec
|
sarahec
|
||||||
];
|
];
|
||||||
mainProgram = "chroma";
|
mainProgram = "chroma";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/chromadb/test/conftest.py b/chromadb/test/conftest.py
|
||||||
|
index efde1c382..163f55c57 100644
|
||||||
|
--- a/chromadb/test/conftest.py
|
||||||
|
+++ b/chromadb/test/conftest.py
|
||||||
|
@@ -678,9 +678,6 @@ def sqlite_persistent(request: pytest.FixtureRequest) -> Generator[System, None,
|
||||||
|
|
||||||
|
def system_fixtures() -> List[Callable[[], Generator[System, None, None]]]:
|
||||||
|
fixtures = [
|
||||||
|
- fastapi,
|
||||||
|
- async_fastapi,
|
||||||
|
- fastapi_persistent,
|
||||||
|
sqlite_fixture,
|
||||||
|
sqlite_persistent_fixture,
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user