Closed a9raag closed 11 months ago
@SimFG Can you help the test cases are failing because of
'(ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10.0)"),
'(Request ID: 3afc7015-e7b6-4b6a-abd6-acd698b9469f)')' thrown while requesting GET
https://huggingface.co/GPTCache/paraphrase-albert-small-v2/resolve/main/tokenizer.json
@a9raag ok, I have rerun it
@SimFG it failed again
Merging #518 (ce8db36) into dev (5aa7e1e) will decrease coverage by
0.16%
. Report is 1 commits behind head on dev. The diff coverage is93.33%
.
@SimFG apologies if I keep bugging you but the Unit Test workflow failed again 😭
Here's the error log
/home/runner/work/_temp/c7cf298b-8f2b-475f-995a-f3f5562139f1.sh: line 3: 3496 Illegal instruction
(core dumped) python3 -m pytest -k "not embedding and not processor" --cov=gptcache --cov-report xml:coverage.xml --cov-append ./tests/
Error: Process completed with exit code 132.
Hi @SimFG and @xiaofan-luan I've updated the PR. The Unit Tests and CodeCov have now passed. Could you please review it when you get a chance? Thanks : )
@a9raag great!!! i will check it today
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: a9raag, SimFG
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Distributed Cache using Redis #496
Feature for distributed cache. This allows us to store
keys
in Redis key-value store. Sorry, it took a while I spent too much time thinking about a design for this and how it will integrate into GPTCache's existing code base.I have also attached a high-level design of how Distributed Cache works.
Notes
A couple of notes about how the eviction will work based on different scalar storage configurations:
Scenario 1: Scalar Storage is MongoDB, Eviction Base is Redis. Then the keys will be stored in Redis, and cache call back will update the TTL.
Scenario 2: Scalar Storage is Redis, Eviction Base is also Redis, Then storing keys separately becomes redundant since Redis eviction is based on Memory usage rather than the number of keys. Also, we'll be fetching values multiple times both while getting scalar data and while hitting cache callback, and it will add network overhead.
To tackle this I created a NoOpEviction implementation (which skips cache operations) since,