Skip to content

Commit 3ca4c97

Browse files
authored
Add distance threshold optimizer classes (#292)
- add base, router, and cache threshold optimizer - uses ranx to support eval metrics - class is designed to receive a optimizer class in the case where someone wants to supply their own without us having to make a release to support something custom
1 parent ad9bb21 commit 3ca4c97

File tree

19 files changed

+2960
-840
lines changed

19 files changed

+2960
-840
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ jobs:
105105
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
106106
run: |
107107
docker run -d --name redis -p 6379:6379 redis/redis-stack-server:latest
108-
make test-notebooks
108+
if [[ "${{ matrix.python-version }}" > "3.9" ]]; then
109+
make test-notebooks
110+
else
111+
poetry run test-notebooks --ignore ./docs/user_guide/09_threshold_optimization.ipynb
112+
fi
109113
110114
docs:
111115
runs-on: ubuntu-latest

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ embeddings = co.embed_many(
222222
### Rerankers
223223
[Integrate with popular reranking providers](https://docs.redisvl.com/en/stable/user_guide/06_rerankers.html) to improve the relevancy of the initial search results from Redis
224224

225+
### Threshold Optimization
226+
[Optimize distance thresholds for cache and router](https://docs.redisvl.com/en/stable/user_guide/09_threshold_optimization.html) with the utility `ThresholdOptimizer` classes.
227+
228+
**Note:** only available for `python > 3.9`.
229+
225230

226231

227232
## 💫 Extensions

0 commit comments

Comments
 (0)