Skip to content

Pull out threshold optimizers and bump to 0.8.0 #350

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- main

env:
POETRY_VERSION: "1.8.3"
POETRY_VERSION: "2.0.1"

jobs:
check:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.8.3"
POETRY_VERSION: "2.0.1"

jobs:
build:
Expand Down
30 changes: 9 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.8.3"
POETRY_VERSION: "2.0.1"

jobs:
service-tests:
Expand Down Expand Up @@ -52,7 +52,6 @@ jobs:
- name: Install dependencies
run: |
poetry install --all-extras
poetry run pip install ranx

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
Expand All @@ -79,7 +78,7 @@ jobs:
make test-all

test:
name: Python ${{ matrix.python-version }} - ${{ matrix.connection }} - redis-py ${{ matrix.redis-py-version }} [redis ${{ matrix.redis-version }}]
name: Python ${{ matrix.python-version }} - redis-py ${{ matrix.redis-py-version }} [redis ${{ matrix.redis-version }}]
runs-on: ubuntu-latest
needs: service-tests
env:
Expand All @@ -89,7 +88,6 @@ jobs:
matrix:
# 3.11 tests are run in the service-tests job
python-version: ["3.9", "3.10", 3.12, 3.13]
connection: ["hiredis", "plain"]
redis-py-version: ["5.x", "6.x"]
redis-version: ["6.2.6-v9", "latest", "8.0.1"]

Expand Down Expand Up @@ -117,7 +115,6 @@ jobs:
- name: Install dependencies
run: |
poetry install --all-extras
poetry run pip install ranx

# Install right redis version based on redis py
if [[ "${{ matrix.redis-py-version }}" == "5.x" ]]; then
Expand All @@ -126,11 +123,6 @@ jobs:
poetry add "redis>=6.0.0,<7.0.0"
fi

# Install hiredis if selected
if [[ "${{ matrix.connection }}" == "hiredis" ]]; then
poetry add hiredis
fi

- name: Set Redis image name
run: |
if [[ "${{ matrix.redis-version }}" == "8.0.1" ]]; then
Expand All @@ -145,21 +137,21 @@ jobs:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}

- name: Run tests
if: matrix.connection == 'plain' && matrix.redis-py-version == '6.x' && matrix.redis-version == 'latest'
# if: matrix.redis-py-version == '6.x' && matrix.redis-version == 'latest'
env:
HF_HOME: ${{ github.workspace }}/hf_cache
GCP_LOCATION: ${{ secrets.GCP_LOCATION }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
run: |
make test

- name: Run tests (alternate)
if: matrix.connection != 'plain' || matrix.redis-py-version != '6.x' || matrix.redis-version != 'latest'
run: |
make test
# - name: Run tests (alternate)
# if: matrix.redis-py-version != '6.x' || matrix.redis-version != 'latest'
# run: |
# make test

- name: Run notebooks
if: matrix.connection == 'plain' && matrix.redis-py-version == '6.x' && matrix.redis-version == 'latest'
if: matrix.redis-py-version == '6.x' && matrix.redis-version == 'latest'
env:
HF_HOME: ${{ github.workspace }}/hf_cache
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Expand All @@ -177,11 +169,7 @@ jobs:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
docker run -d --name redis -p 6379:6379 redis/redis-stack-server:latest
if [[ "${{ matrix.python-version }}" > "3.9" ]]; then
make test-notebooks
else
poetry run test-notebooks --ignore ./docs/user_guide/09_threshold_optimization.ipynb --ignore ./docs/user_guide/release_guide/0_5_1_release.ipynb
fi
make test-notebooks

docs:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ redisvl/
├── redis/ # Redis client utilities
├── schema/ # Index schema definitions
└── utils/ # Utilities (vectorizers, rerankers, optimization)
├── optimize/ # Threshold optimization
├── rerank/ # Result reranking
└── vectorize/ # Embedding providers integration
```
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,6 @@ embeddings = co.embed_many(
### Rerankers
[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

### Threshold Optimization
[Optimize distance thresholds for cache and router](https://docs.redisvl.com/en/stable/user_guide/09_threshold_optimization.html) with the utility `ThresholdOptimizer` classes.

**Note:** only available for `python > 3.9`.



## 💫 Extensions
We're excited to announce the support for **RedisVL Extensions**. These modules implement interfaces exposing best practices and design patterns for working with LLM memory and agents. We've taken the best from what we've learned from our users (that's you) as well as bleeding-edge customers, and packaged it up.
Expand Down
1 change: 0 additions & 1 deletion docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ reranker
cache
message_history
router
threshold_optimizer
```

26 changes: 0 additions & 26 deletions docs/api/threshold_optimizer.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# -- Project information -----------------------------------------------------

from redisvl.version import __version__
from redisvl import __version__

project = 'RedisVL'
copyright = '2024, Redis Inc.'
Expand Down
4 changes: 2 additions & 2 deletions docs/overview/cli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"16:41:26 [RedisVL] INFO RedisVL version 0.7.0\n"
"14:33:37 [RedisVL] INFO RedisVL version 0.8.0\n"
]
}
],
Expand Down
Loading