Skip to content

Commit

Permalink
[ENH] Upgrade tests and release to Python 3.12 (chroma-core#1715)
Browse files Browse the repository at this point in the history
## Description of changes

Chroma did not support Python 3.12 because of our dependency on the ONNX
runtime for our default embedding function. As of version 1.17.0, ONNX
supports python 3.12:
microsoft/onnxruntime#17842 (comment)

This already automatically fixes the issue for Chroma users when they
install the new version of ONNX / reinstall Chroma. This PR is just to
update our test and release actions to also use python 3.12.

## Test plan

These are changes to test workers. 

## Documentation Changes
N/A
  • Loading branch information
atroyn committed Apr 3, 2024
1 parent 9d763e4 commit c57e3c8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chroma-client-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 90
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11']
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chroma-release-python-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
- name: Install Client Dev Dependencies
run: python -m pip install -r ./clients/python/requirements.txt && python -m pip install -r ./clients/python/requirements_dev.txt
- name: Build Client
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chroma-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
timeout-minutes: 90
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11']
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
platform: [ubuntu-latest, windows-latest]
testfile: ["--ignore-glob 'chromadb/test/property/*' --ignore-glob 'chromadb/test/stress/*' --ignore='chromadb/test/auth/test_simple_rbac_authz.py'",
"chromadb/test/auth/test_simple_rbac_authz.py",
Expand Down
6 changes: 2 additions & 4 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ https://packaging.python.org.

## Setup

Because of the dependencies it relies on (like `pytorch`), this project does not support Python version >3.10.0.

Set up a virtual environment and install the project's requirements
and dev requirements:

Expand Down Expand Up @@ -51,14 +49,14 @@ api = chromadb.HttpClient(host="localhost", port="8000")
print(api.heartbeat())
```
## Local dev setup for distributed chroma
We use tilt for providing local dev setup. Tilt is an open source project
We use tilt for providing local dev setup. Tilt is an open source project
##### Requirement
- Docker
- Local Kubernetes cluster (Recommended: [OrbStack](https://orbstack.dev/) for mac, [Kind](https://kind.sigs.k8s.io/) for linux)
- [Tilt](https://docs.tilt.dev/)

For starting the distributed Chroma in the workspace, use `tilt up`. It will create all the required resources and build the necessary Docker image in the current kubectl context.
Once done, it will expose Chroma on port 8000. You can also visit the Tilt dashboard UI at http://localhost:10350/. To clean and remove all the resources created by Tilt, use `tilt down`.
Once done, it will expose Chroma on port 8000. You can also visit the Tilt dashboard UI at http://localhost:10350/. To clean and remove all the resources created by Tilt, use `tilt down`.

## Testing

Expand Down
20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bcrypt==4.0.1
chroma-hnswlib==0.7.3
bcrypt>=4.0.1
chroma-hnswlib>=0.7.3
fastapi>=0.95.2
graphlib_backport==1.0.3; python_version < '3.9'
grpcio>=1.58.0
Expand All @@ -12,17 +12,17 @@ opentelemetry-api>=1.2.0
opentelemetry-exporter-otlp-proto-grpc>=1.2.0
opentelemetry-instrumentation-fastapi>=0.41b0
opentelemetry-sdk>=1.2.0
overrides==7.3.1
posthog==2.4.0
pulsar-client==3.1.0
overrides>=7.3.1
posthog>=2.4.0
pulsar-client>=3.1.0
pydantic>=1.9
pypika==0.48.9
pypika>=0.48.9
PyYAML>=6.0.0
requests==2.28.1
requests>=2.28.1
tenacity>=8.2.3
tokenizers==0.13.2
tokenizers>=0.13.2
tqdm>=4.65.0
typer>=0.9.0
typing_extensions>=4.5.0
uvicorn[standard]==0.18.3
orjson>=3.9.12
uvicorn[standard]>=0.18.3
orjson>=3.9.12

0 comments on commit c57e3c8

Please sign in to comment.