python3Packages.chromadb: 1.0.12 -> 1.0.20 (#435763)

authored by

Gaétan Lepage and committed by
GitHub
8c4f2731 3a212fa7

+32 -63
+31 -48
pkgs/development/python-modules/chromadb/default.nix
··· 7 8 # build inputs 9 cargo, 10 pkg-config, 11 protobuf, 12 rustc, 13 rustPlatform, 14 - pkgs, # zstd hidden by python3Packages.zstd 15 - openssl, 16 17 # dependencies 18 bcrypt, ··· 33 orjson, 34 overrides, 35 posthog, 36 pydantic, 37 pypika, 38 pyyaml, ··· 66 67 buildPythonPackage rec { 68 pname = "chromadb"; 69 - version = "1.0.12"; 70 pyproject = true; 71 72 src = fetchFromGitHub { 73 owner = "chroma-core"; 74 repo = "chroma"; 75 tag = version; 76 - hash = "sha256-Q4PhJTRNzJeVx6DIPWirnI9KksNb8vfOtqb/q9tSK3c="; 77 }; 78 79 cargoDeps = rustPlatform.fetchCargoVendor { 80 inherit src; 81 name = "${pname}-${version}-vendor"; 82 - hash = "sha256-+Ea2aRrsBGfVCLdOF41jeMehJhMurc8d0UKrpR6ndag="; 83 }; 84 85 # Can't use fetchFromGitHub as the build expects a zipfile ··· 88 hash = "sha256-H+kXxA/6rKzYA19v7Zlx2HbIg/DGicD5FDIs0noVGSk="; 89 }; 90 91 - patches = [ 92 - # The fastapi servers can't set up their networking in the test environment, so disable for testing 93 - ./disable-fastapi-fixtures.patch 94 - ]; 95 - 96 postPatch = '' 97 # Nixpkgs is taking the version from `chromadb_rust_bindings` which is versioned independently 98 substituteInPlace pyproject.toml \ ··· 101 102 pythonRelaxDeps = [ 103 "fastapi" 104 ]; 105 106 build-system = [ ··· 117 118 buildInputs = [ 119 openssl 120 - pkgs.zstd 121 ]; 122 123 dependencies = [ ··· 139 orjson 140 overrides 141 posthog 142 pydantic 143 pypika 144 pyyaml ··· 182 }; 183 184 pytestFlags = [ 185 - "-x" # these are slow tests, so stop on the first failure 186 "-v" 187 "-Wignore:DeprecationWarning" 188 "-Wignore:PytestCollectionWarning" 189 ]; 190 191 preCheck = '' 192 (($(ulimit -n) < 1024)) && ulimit -n 1024 193 - export HOME=$(mktemp -d) 194 ''; 195 196 - disabledTests = [ 197 - # Tests are flaky / timing sensitive 198 - "test_fastapi_server_token_authn_allows_when_it_should_allow" 199 - "test_fastapi_server_token_authn_rejects_when_it_should_reject" 200 - 201 - # Issue with event loop 202 - "test_http_client_bw_compatibility" 203 - 204 - # httpx ReadError 205 - "test_not_existing_collection_delete" 206 207 - # Tests launch a server and try to connect to it 208 - # These either have https connection errors or name resolution errors 209 "test_collection_query_with_invalid_collection_throws" 210 "test_collection_update_with_invalid_collection_throws" 211 "test_default_embedding" 212 - "test_invalid_index_params" 213 - "test_peek" 214 "test_persist_index_loading" 215 - "test_query_id_filtering_e2e" 216 - "test_query_id_filtering_medium_dataset" 217 - "test_query_id_filtering_small_dataset" 218 "test_ssl_self_signed_without_ssl_verify" 219 "test_ssl_self_signed" 220 - 221 - # Apparent race condition with sqlite 222 - # See https://github.com/chroma-core/chroma/issues/4661 223 - "test_multithreaded_get_or_create" 224 ]; 225 226 disabledTestPaths = [ 227 # Tests require network access 228 - "bin/rust_python_compat_test.py" 229 - "chromadb/test/configurations/test_collection_configuration.py" 230 - "chromadb/test/ef/test_default_ef.py" 231 - "chromadb/test/ef/test_onnx_mini_lm_l6_v2.py" 232 - "chromadb/test/ef/test_voyageai_ef.py" 233 - "chromadb/test/property/" 234 "chromadb/test/property/test_cross_version_persist.py" 235 - "chromadb/test/stress/" 236 - "chromadb/test/test_api.py" 237 238 - # Tests time out (waiting for server) 239 - "chromadb/test/test_cli.py" 240 - 241 - # Cannot find protobuf file while loading test 242 - "chromadb/test/distributed/test_log_failover.py" 243 244 # ValueError: An instance of Chroma already exists for ephemeral with different settings 245 "chromadb/test/test_chroma.py" 246 - "chromadb/test/ef/test_multimodal_ef.py" 247 ]; 248 249 __darwinAllowLocalNetworking = true;
··· 7 8 # build inputs 9 cargo, 10 + openssl, 11 pkg-config, 12 protobuf, 13 rustc, 14 rustPlatform, 15 + zstd-c, 16 17 # dependencies 18 bcrypt, ··· 33 orjson, 34 overrides, 35 posthog, 36 + pybase64, 37 pydantic, 38 pypika, 39 pyyaml, ··· 67 68 buildPythonPackage rec { 69 pname = "chromadb"; 70 + version = "1.0.20"; 71 pyproject = true; 72 73 src = fetchFromGitHub { 74 owner = "chroma-core"; 75 repo = "chroma"; 76 tag = version; 77 + hash = "sha256-jwgm1IXAyctLzUi9GZfgRMiqAuq1BwpcZp/UMlV2t7g="; 78 }; 79 80 cargoDeps = rustPlatform.fetchCargoVendor { 81 inherit src; 82 name = "${pname}-${version}-vendor"; 83 + hash = "sha256-A4I0xAGmwF9Th+g8bWEmhCRTAp4Q6GYkejHKDqoczY4="; 84 }; 85 86 # Can't use fetchFromGitHub as the build expects a zipfile ··· 89 hash = "sha256-H+kXxA/6rKzYA19v7Zlx2HbIg/DGicD5FDIs0noVGSk="; 90 }; 91 92 postPatch = '' 93 # Nixpkgs is taking the version from `chromadb_rust_bindings` which is versioned independently 94 substituteInPlace pyproject.toml \ ··· 97 98 pythonRelaxDeps = [ 99 "fastapi" 100 + "posthog" 101 ]; 102 103 build-system = [ ··· 114 115 buildInputs = [ 116 openssl 117 + zstd-c 118 ]; 119 120 dependencies = [ ··· 136 orjson 137 overrides 138 posthog 139 + pybase64 140 pydantic 141 pypika 142 pyyaml ··· 180 }; 181 182 pytestFlags = [ 183 "-v" 184 "-Wignore:DeprecationWarning" 185 "-Wignore:PytestCollectionWarning" 186 ]; 187 188 + # Skip the distributed and integration tests 189 + # See https://github.com/chroma-core/chroma/issues/5315 190 preCheck = '' 191 (($(ulimit -n) < 1024)) && ulimit -n 1024 192 + export CHROMA_RUST_BINDINGS_TEST_ONLY=1 193 ''; 194 195 + enabledTestPaths = [ 196 + "chromadb/test" 197 + ]; 198 199 + disabledTests = [ 200 + # Failure in name resolution 201 "test_collection_query_with_invalid_collection_throws" 202 "test_collection_update_with_invalid_collection_throws" 203 "test_default_embedding" 204 "test_persist_index_loading" 205 + 206 + # Deadlocks intermittently 207 + "test_app" 208 + 209 + # Depends on specific floating-point precision 210 + "test_base64_conversion_is_identity_f16" 211 + 212 + # No such file or directory: 'openssl' 213 "test_ssl_self_signed_without_ssl_verify" 214 "test_ssl_self_signed" 215 ]; 216 217 disabledTestPaths = [ 218 # Tests require network access 219 + "chromadb/test/distributed" 220 + "chromadb/test/ef" 221 "chromadb/test/property/test_cross_version_persist.py" 222 + "chromadb/test/stress" 223 224 + # Excessively slow 225 + "chromadb/test/property/test_add.py" 226 + "chromadb/test/property/test_persist.py" 227 228 # ValueError: An instance of Chroma already exists for ephemeral with different settings 229 "chromadb/test/test_chroma.py" 230 ]; 231 232 __darwinAllowLocalNetworking = true;
-14
pkgs/development/python-modules/chromadb/disable-fastapi-fixtures.patch
··· 1 - diff --git a/chromadb/test/conftest.py b/chromadb/test/conftest.py 2 - index efde1c382..163f55c57 100644 3 - --- a/chromadb/test/conftest.py 4 - +++ b/chromadb/test/conftest.py 5 - @@ -678,9 +678,6 @@ def sqlite_persistent(request: pytest.FixtureRequest) -> Generator[System, None, 6 - 7 - def system_fixtures() -> List[Callable[[], Generator[System, None, None]]]: 8 - fixtures = [ 9 - - fastapi, 10 - - async_fastapi, 11 - - fastapi_persistent, 12 - sqlite_fixture, 13 - sqlite_persistent_fixture, 14 - ]
···
+1 -1
pkgs/top-level/python-packages.nix
··· 2520 2521 chroma-hnswlib = callPackage ../development/python-modules/chroma-hnswlib { }; 2522 2523 - chromadb = callPackage ../development/python-modules/chromadb { }; 2524 2525 chromaprint = callPackage ../development/python-modules/chromaprint { }; 2526
··· 2520 2521 chroma-hnswlib = callPackage ../development/python-modules/chroma-hnswlib { }; 2522 2523 + chromadb = callPackage ../development/python-modules/chromadb { zstd-c = pkgs.zstd; }; 2524 2525 chromaprint = callPackage ../development/python-modules/chromaprint { }; 2526