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]: Error occurs when upgrading embedchain to the 0.1.125 version #3188

Open
Rainismer opened this issue Nov 25, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@Rainismer
Copy link

What happened?

TypeError: SegmentAPI.get_or_create_collection() got an unexpected keyword argument 'embedding_function'

image

Versions

Chroma 0.5.20,Python 3.11, OS Windows10

Relevant log output

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1232, in _handle_fromlist
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\AIGC\idataai_py\services_router\query2sql_service.py", line 12, in <module>
    from services.s2sql.run import text2sql_agent_router
  File "D:\AIGC\idataai_py\services\s2sql\run.py", line 48, in <module>
    text2sql_agent.reload_setting(sql_ids, sql_exemplars, TEXT2DSL_EXAMPLE_NUM, TEXT2DSL_FEWSHOTS_NUM, TEXT2DSL_SELF_CONSISTENCY_NUM)
  File "D:\AIGC\idataai_py\services\s2sql\sql_agent.py", line 478, in reload_setting
    self.sql_example_prompter.reload_few_shot_example(sql_example_ids, sql_example_units)
  File "D:\AIGC\idataai_py\services\s2sql\constructor.py", line 51, in reload_few_shot_example
    self.few_shot_retriever.empty_query_collection()
  File "D:\AIGC\idataai_py\services\query_retrieval\retriever.py", line 70, in empty_query_collection
    self.collection = empty_chroma_collection_2(self.collection)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AIGC\idataai_py\utils\chromadb_utils.py", line 25, in empty_chroma_collection_2
    new_collection = client.get_or_create_collection(name=collection_name,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AIGC\idataai_py\venv\Lib\site-packages\chromadb\telemetry\opentelemetry\__init__.py", line 150, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "D:\AIGC\idataai_py\venv\Lib\site-packages\chromadb\api\segment.py", line 103, in wrapper
    return self._rate_limit_enforcer.rate_limit(func)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AIGC\idataai_py\venv\Lib\site-packages\chromadb\rate_limit\simple_rate_limit\__init__.py", line 23, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
TypeError: SegmentAPI.get_or_create_collection() got an unexpected keyword argument 'embedding_function'
python-BaseException
@Rainismer Rainismer added the bug Something isn't working label Nov 25, 2024
@tazarov
Copy link
Contributor

tazarov commented Nov 26, 2024

hey @Rainismer, is this the project you are referring to https://github.com/mem0ai/mem0? Overall the error seems to be related to a tight coupling with Chroma internal APIs (aka SegmentAPI). Can you share the code for empty_query_collection or empty_chroma_collection_2 from chromadb_utils

@Rainismer
Copy link
Author

@tazarov Yes, this is the project I mentioned. Please check the attachment:chromadb_utils.txt.

chromadb_utils.txt

@Rainismer
Copy link
Author

@tazarov How long will it take to fix this issue?

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

2 participants