-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
python3Packages.chromadb: fixes #412528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
python3Packages.chromadb: fixes #412528
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e54888c
python3Packages.chromadb: refactor
sarahec 249fd9d
python3Packages.chromadb: 0.5.20 -> 0.6.3
sarahec 23d0f15
python3Packages.chromadb_0: init at 0.6.3
sarahec 6126501
python3Packages.chromadb: 0.6.3 -> 1.0.12
sarahec 2e6caf7
python3Packages.vectorcode: use pre-1.0.0 version of chromadb
sarahec c112d76
python3Packages.langchain-chroma: 0.2.3 -> 0.2.4
sarahec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,220 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| buildPythonPackage, | ||
| fetchFromGitHub, | ||
|
|
||
| # build-system | ||
| setuptools-scm, | ||
| setuptools, | ||
|
|
||
| # build inputs | ||
| cargo, | ||
| pkg-config, | ||
| protobuf, | ||
| rustc, | ||
| rustPlatform, | ||
| openssl, | ||
|
|
||
| # dependencies | ||
| bcrypt, | ||
| build, | ||
| fastapi, | ||
| grpcio, | ||
| httpx, | ||
| importlib-resources, | ||
| kubernetes, | ||
| mmh3, | ||
| numpy, | ||
| onnxruntime, | ||
| opentelemetry-api, | ||
| opentelemetry-exporter-otlp-proto-grpc, | ||
| opentelemetry-instrumentation-fastapi, | ||
| opentelemetry-sdk, | ||
| orjson, | ||
| overrides, | ||
| posthog, | ||
| pulsar-client, | ||
| pydantic, | ||
| pypika, | ||
| pyyaml, | ||
| requests, | ||
| tenacity, | ||
| tokenizers, | ||
| tqdm, | ||
| typer, | ||
| typing-extensions, | ||
| uvicorn, | ||
| zstd, | ||
|
|
||
| # optional dependencies | ||
| chroma-hnswlib, | ||
|
|
||
| # tests | ||
| hypothesis, | ||
| psutil, | ||
| pytest-asyncio, | ||
| pytestCheckHook, | ||
|
|
||
| # passthru | ||
| nixosTests, | ||
| nix-update-script, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "chromadb_0"; | ||
| version = "0.6.3"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "chroma-core"; | ||
| repo = "chroma"; | ||
| tag = version; | ||
| hash = "sha256-yvAX8buETsdPvMQmRK5+WFz4fVaGIdNlfhSadtHwU5U="; | ||
| }; | ||
|
|
||
| cargoDeps = rustPlatform.fetchCargoVendor { | ||
| inherit src; | ||
| name = "${pname}-${version}"; | ||
| hash = "sha256-lHRBXJa/OFNf4x7afEJw9XcuDveTBIy3XpQ3+19JXn4="; | ||
| }; | ||
|
|
||
| pythonRelaxDeps = [ | ||
| "chroma-hnswlib" | ||
| "orjson" | ||
| "tokenizers" | ||
| ]; | ||
|
|
||
| build-system = [ | ||
| setuptools | ||
| setuptools-scm | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ | ||
| cargo | ||
| pkg-config | ||
| protobuf | ||
| rustc | ||
| rustPlatform.cargoSetupHook | ||
| ]; | ||
|
|
||
| buildInputs = [ | ||
| openssl | ||
| zstd | ||
| ]; | ||
|
|
||
| dependencies = [ | ||
| bcrypt | ||
| build | ||
| chroma-hnswlib | ||
| fastapi | ||
| grpcio | ||
| httpx | ||
| importlib-resources | ||
| kubernetes | ||
| mmh3 | ||
| numpy | ||
| onnxruntime | ||
| opentelemetry-api | ||
| opentelemetry-exporter-otlp-proto-grpc | ||
| opentelemetry-instrumentation-fastapi | ||
| opentelemetry-sdk | ||
| orjson | ||
| overrides | ||
| posthog | ||
| pulsar-client | ||
| pydantic | ||
| pypika | ||
| pyyaml | ||
| requests | ||
| tenacity | ||
| tokenizers | ||
| tqdm | ||
| typer | ||
| typing-extensions | ||
| uvicorn | ||
| ]; | ||
|
|
||
| nativeCheckInputs = [ | ||
| hypothesis | ||
| psutil | ||
| pytest-asyncio | ||
| pytestCheckHook | ||
| ]; | ||
|
|
||
| # Disable on aarch64-linux due to broken onnxruntime | ||
| # https://github.com/microsoft/onnxruntime/issues/10038 | ||
| pythonImportsCheck = lib.optionals (stdenv.hostPlatform.system != "aarch64-linux") [ "chromadb" ]; | ||
|
|
||
| # Test collection breaks on aarch64-linux | ||
| doCheck = stdenv.hostPlatform.system != "aarch64-linux"; | ||
|
|
||
| env = { | ||
| ZSTD_SYS_USE_PKG_CONFIG = true; | ||
| }; | ||
|
|
||
| pytestFlagsArray = [ | ||
| "-x" # these are slow tests, so stop on the first failure | ||
| "-v" | ||
| ]; | ||
|
|
||
| preCheck = '' | ||
| (($(ulimit -n) < 1024)) && ulimit -n 1024 | ||
| export HOME=$(mktemp -d) | ||
| ''; | ||
|
|
||
| disabledTests = [ | ||
| # Tests are flaky / timing sensitive | ||
| "test_fastapi_server_token_authn_allows_when_it_should_allow" | ||
| "test_fastapi_server_token_authn_rejects_when_it_should_reject" | ||
|
|
||
| # Issue with event loop | ||
| "test_http_client_bw_compatibility" | ||
|
|
||
| # httpx ReadError | ||
| "test_not_existing_collection_delete" | ||
| ]; | ||
|
|
||
| disabledTestPaths = [ | ||
| # Tests require network access | ||
| "chromadb/test/auth/test_simple_rbac_authz.py" | ||
| "chromadb/test/db/test_system.py" | ||
| "chromadb/test/ef/test_default_ef.py" | ||
| "chromadb/test/property/" | ||
| "chromadb/test/property/test_cross_version_persist.py" | ||
| "chromadb/test/stress/" | ||
| "chromadb/test/test_api.py" | ||
|
|
||
| # httpx failures | ||
| "chromadb/test/api/test_delete_database.py" | ||
|
|
||
| # Cannot be loaded by pytest without path hacks (fixed in 1.0.0) | ||
| "chromadb/test/test_logservice.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; | ||
|
|
||
| passthru.tests = { | ||
| inherit (nixosTests) chromadb; | ||
| }; | ||
|
|
||
| # nixpkgs-update: no auto update | ||
| # 0.6.3 is the last of the 0.x series | ||
|
|
||
| meta = { | ||
| description = "AI-native open-source embedding database"; | ||
| homepage = "https://github.com/chroma-core/chroma"; | ||
| changelog = "https://github.com/chroma-core/chroma/releases/tag/${version}"; | ||
| license = lib.licenses.asl20; | ||
| maintainers = with lib.maintainers; [ | ||
| fab | ||
| sarahec | ||
| ]; | ||
| mainProgram = "chroma"; | ||
GaetanLepage marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
packageOverrides.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'll fix it.