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

Fix the pylint error and add the chromadb test #457

Merged
merged 1 commit into from
Jun 29, 2023
Merged

Conversation

SimFG
Copy link
Collaborator

@SimFG SimFG commented Jun 29, 2023

No description provided.

@sre-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SimFG

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@SimFG
Copy link
Collaborator Author

SimFG commented Jun 29, 2023

@wybryan
I put the health_check parameter in the cache in the config, which can be set during initialization or separately

cache.init(config=Config(data_check=True))
# or
cache.config.data_check = True

@wybryan
Copy link
Contributor

wybryan commented Jun 29, 2023

@wybryan I put the health_check parameter in the cache in the config, which can be set during initialization or separately

cache.init(config=Config(data_check=True))
# or
cache.config.data_check = True

quick note, there is a bug in the GPTCache: for Chroma to work, the embeddings must be converted to float64, otherwise you get save failure message from chroma.

@wybryan
Copy link
Contributor

wybryan commented Jun 29, 2023

@wybryan I put the health_check parameter in the cache in the config, which can be set during initialization or separately

cache.init(config=Config(data_check=True))
# or
cache.config.data_check = True

quick note, there is a bug in the GPTCache: for Chroma to work, the embeddings must be converted to float64, otherwise you get save failure message from chroma.

I have a local fix by subclass SBERT class and implment to_float64_embeddings() method for Chroma, but I am not sure it is the best way to do it, I'll let you decide. :)

@SimFG
Copy link
Collaborator Author

SimFG commented Jun 29, 2023

I also encountered this problem when I wrote the test, this pr will fix it, because this test writes a test about Chromadb

@SimFG SimFG changed the title Fix the pylint error and add the chromedb test Fix the pylint error and add the chromadb test Jun 29, 2023
Signed-off-by: SimFG <bang.fu@zilliz.com>
@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Merging #457 (9c6294f) into dev (94c8471) will increase coverage by 0.14%.
The diff coverage is 82.60%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #457      +/-   ##
==========================================
+ Coverage   93.88%   94.03%   +0.14%     
==========================================
  Files          91       91              
  Lines        3452     3452              
==========================================
+ Hits         3241     3246       +5     
+ Misses        211      206       -5     
Impacted Files Coverage Δ
gptcache/adapter/adapter.py 87.32% <50.00%> (-0.06%) ⬇️
gptcache/manager/vector_data/qdrant.py 88.67% <86.66%> (ø)
gptcache/config.py 100.00% <100.00%> (ø)
gptcache/manager/vector_data/chroma.py 87.50% <100.00%> (+12.50%) ⬆️

@SimFG SimFG merged commit f486d1b into zilliztech:dev Jun 29, 2023
sunilkumardash9 pushed a commit to sunilkumardash9/GPTCache that referenced this pull request Jul 7, 2023
Signed-off-by: SimFG <bang.fu@zilliz.com>
Signed-off-by: sunilkumardash9 <sunilkumardash9@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants