Skip to content
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

[Bug]: get embeddings result sometime work ,sometime error #1979

Open
zyu opened this issue Apr 7, 2024 · 4 comments
Open

[Bug]: get embeddings result sometime work ,sometime error #1979

zyu opened this issue Apr 7, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@zyu
Copy link

zyu commented Apr 7, 2024

What happened?

r = collection.get( where={"timespan": {"$gte": 1712435107}}, include=[ "embeddings" ] )

Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/api/fastapi.py", line 652, in raise_chroma_error
resp.raise_for_status()
File "/opt/miniconda3/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:8090/api/v1/collections/183b4fe9-b24a-4136-ad77-0943677de6a5/get

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/zyu/code/repeat/updatetime.py", line 38, in
r = collection.get(
^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/api/models/Collection.py", line 211, in get
get_results = self._client._get(
^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/init.py", line 127, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/api/fastapi.py", line 436, in _get
raise_chroma_error(resp)
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/api/fastapi.py", line 654, in raise_chroma_error
raise (Exception(resp.text))
Exception: {"error":"IndexError('list assignment index out of range')"}

sometime work ,but sometime error

Versions

v0.3.22

Relevant log output

No response

@zyu zyu added the bug Something isn't working label Apr 7, 2024
@zyu
Copy link
Author

zyu commented Apr 7, 2024

File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/auth/fastapi.py", line 242, in wrapped
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/server/fastapi/init.py", line 563, in get
return self._api._get(
^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/init.py", line 127, in wrapper
if trace_granularity < granularity:
^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/rate_limiting/init.py", line 45, in wrapper
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/api/segment.py", line 538, in _get
vectors = vector_segment.get_vectors(ids=vector_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/init.py", line 127, in wrapper
if trace_granularity < granularity:
^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 330, in get_vectors
results[id_to_index[id]] = VectorEmbeddingRecord(
~~~~~~~^^^^^^^^^^^^^^^^^
IndexError: list assignment index out of range

@nicolasgere
Copy link
Contributor

Hello @zyu, thank you for reporting the error. I was not able to reproduce it with version 0.3.22. Could you provide more details about the code and the context in which the error occurs? Did you try update to the last version of chroma?

Thanks

@tazarov
Copy link
Contributor

tazarov commented Apr 8, 2024

@zyu, In the trace I see references to opentelemetry. We've added OTEL only in version 0.4.x. Can you please double check your Chroma version - pip list | grep chromadb. Thank you.

@tazarov
Copy link
Contributor

tazarov commented Apr 24, 2024

@zyu, the issue affects 0.4.x and is being worked on. We'll have a PR for it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants