Skip to content

[Install issue]: cannot create new collection on vm in gcp #950

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

Closed
goelzva opened this issue Aug 8, 2023 · 9 comments
Closed

[Install issue]: cannot create new collection on vm in gcp #950

goelzva opened this issue Aug 8, 2023 · 9 comments
Assignees
Labels
installation trouble trouble building or installing chroma

Comments

@goelzva
Copy link

goelzva commented Aug 8, 2023

What happened?

I set up a VM on gcp with your terraform templates in the deployment examples. The VM is up and running and I can get a heartbeat, but when I try to create a new collection with my HttpClient no id is created, thus the call fails. The collection is still created but without an id, rendering it useless.
image

Versions

Chroma v0.4.5, Python 3.10, Mac

Relevant log output

Traceback (most recent call last):
  File "/Users/acc/Documents/repo/our_repo/nova/scripts/chroma_second_test.py", line 10, in <module>
    collection = client.create_collection("test4")
  File "/Users/acc/Documents/repo/our_repo/.venv/lib/python3.10/site-packages/chromadb/api/fastapi.py", line 92, in create_collection
    id=resp_json["id"],
KeyError: 'id'

Process finished with exit code 1
@goelzva goelzva added the installation trouble trouble building or installing chroma label Aug 8, 2023
@tazarov
Copy link
Contributor

tazarov commented Aug 8, 2023

@Bl4ckEnd, not sure if you have noticed that the TF template uses chroma 0.3.14 whereas you mention you use chroma client 0.4.5 - https://github.com/chroma-core/chroma/blob/221bdfa91335bb096fbc632f098a858ff56ea866/examples/deployments/google-cloud-compute/startup.sh#L22C4-L22C45

If you can update the TF to use the latest version of chroma however you have to observe that the latest docker-compose does not rely on clickhouse anymore.

@jeffchuber @HammadB I think we can update the TF template to reflect the latest version of chroma

@HammadB
Copy link
Collaborator

HammadB commented Aug 8, 2023

Yes, we need to update the terraform @tazarov - is that something you would be up for?

@tazarov
Copy link
Contributor

tazarov commented Aug 8, 2023

@HammadB, sure, assign this to me.

tazarov added a commit to amikos-tech/chroma-core that referenced this issue Aug 8, 2023
- The project will now clone the chroma repo and deploy docker-compose from it
- Introduced a new TF var chroma_release to be able to deploy a any (oh well almost any, chroma version, defaults to 0.4.5)
- Added output instance_public_ip var to print out the IP address of the VM

Refs: chroma-core#950
@tazarov
Copy link
Contributor

tazarov commented Aug 8, 2023

@HammadB done and tested. Check the PR

@HammadB
Copy link
Collaborator

HammadB commented Aug 8, 2023

Amazing! Thank you :)

@tazarov
Copy link
Contributor

tazarov commented Aug 8, 2023

@Bl4ckEnd now once the VM is started (takes about 5mins) everything seems to be working fine including creating a collection with HttpClient (0.4.5).

tazarov added a commit to amikos-tech/chroma-core that referenced this issue Aug 8, 2023
tazarov added a commit to amikos-tech/chroma-core that referenced this issue Aug 8, 2023
HammadB pushed a commit that referenced this issue Aug 8, 2023
- The project will now clone the chroma repo and deploy docker-compose
from it
- Introduced a new TF var chroma_release to be able to deploy a any (oh
well almost any, chroma version, defaults to 0.4.5)
- Added output instance_public_ip var to print out the IP address of the
VM

Refs: #950

## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Made it possible to deploy any version of chroma through TF var
chroma_release (defaults to 0.4.5)
- Made it so that the VM would clone the repo and checkout the release
tag then run docker compose from it
	 - Added output of the public IP of the VM after TF deployment
	 - Improved slightly the README.md

## Test plan
*How are these changes tested?*

```bash
gcloud auth application-default login
cd examples/deployments/google-cloud-compute
terraform init
export TF_VAR_project_id=<your_project_id> #take note of this as it must be present in all of the subsequent steps
export TF_VAR_chroma_release=0.4.5 #set the chroma release to deploy
terraform apply -auto-approve
terraform output instance_public_ip
export instance_public_ip=$(terraform output instance_public_ip)
curl -v http://$instance_public_ip:8000/api/v1
terraform destroy -auto-approve
```

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
@tazarov
Copy link
Contributor

tazarov commented Aug 8, 2023

@HammadB I think we can close this.

@HammadB
Copy link
Collaborator

HammadB commented Aug 8, 2023

Yep! Thanks. @Bl4ckEnd i think the underlying issue for you was client <> server version mismatch. @tazarov has kindly updated the TF to deploy the correct (or any) version of chroma so that should work now.

We should probably not allow incompatible clients to communicate with the server. Closing this out but feel free to reopen if needed.

@HammadB HammadB closed this as completed Aug 8, 2023
@goelzva
Copy link
Author

goelzva commented Aug 9, 2023

Many thanks for your fast help guys!

rohitcpbot added a commit that referenced this issue Jan 10, 2025
## Description of changes

Proto definitions and GRPC defs for supporting Versioned Collections.
Part of GC work.

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
   - ...
 - New functionality
   - Adds protobufs for Versioned Collections.

## Test plan
*How are these changes tested?*

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
n/a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation trouble trouble building or installing chroma
Projects
None yet
Development

No branches or pull requests

3 participants