Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 43ce2a4

Browse files
elena-kolevskavladvildanov
andauthored
Updating the latest Redis image for github pipeline testing (#3726)
* Updates test image Signed-off-by: Elena Kolevska <elena@kolevska.com> * Adds testcase for RECUCE and COMPRESSION in ft.createindex Signed-off-by: Elena Kolevska <elena@kolevska.com> * linter Signed-off-by: Elena Kolevska <elena@kolevska.com> * case sensitive imnage name Signed-off-by: Elena Kolevska <elena@kolevska.com> * Updates compression Signed-off-by: Elena Kolevska <elena@kolevska.com> * Removed already covered Python version from matrix * Updated test image * Updated test cases --------- Signed-off-by: Elena Kolevska <elena@kolevska.com> Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com> Co-authored-by: vladvildanov <vladyslav.vildanov@redis.com>
1 parent 64426cb commit 43ce2a4

File tree

4 files changed

+53
-4
lines changed

4 files changed

+53
-4
lines changed

‎.github/workflows/integration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
max-parallel: 15
7575
fail-fast: false
7676
matrix:
77-
redis-version: ['8.2-RC1-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.4.4', '7.2.9']
77+
redis-version: ['8.2', '${{ needs.redis_version.outputs.CURRENT }}', '7.4.4', '7.2.9']
7878
python-version: ['3.9', '3.13']
7979
parser-backend: ['plain']
8080
event-loop: ['asyncio']
@@ -99,7 +99,7 @@ jobs:
9999
fail-fast: false
100100
matrix:
101101
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
102-
python-version: ['3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
102+
python-version: ['3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
103103
parser-backend: [ 'plain' ]
104104
event-loop: [ 'asyncio' ]
105105
env:

‎tests/test_asyncio/test_vsets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ async def test_vsim_epsilon(d_client):
435435
assert 5 == len(res1)
436436

437437
res2 = await d_client.vset().vsim("myset", [2, 1, 1], epsilon=0.5)
438-
assert 3 == len(res2)
438+
assert 4 == len(res2)
439439

440440

441441
@skip_if_server_version_lt("7.9.0")

‎tests/test_search.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3802,3 +3802,52 @@ def test_svs_vamana_vector_search_with_parameters(client):
38023802
else:
38033803
assert res["total_results"] == 3
38043804
assert "doc0" == res["results"][0]["id"]
3805+
3806+
3807+
@pytest.mark.redismod
3808+
@skip_ifmodversion_lt("2.4.3", "search")
3809+
@skip_if_server_version_lt("8.1.224")
3810+
def test_svs_vamana_vector_search_with_parameters_leanvec(client):
3811+
client.ft().create_index(
3812+
(
3813+
VectorField(
3814+
"v",
3815+
"SVS-VAMANA",
3816+
{
3817+
"TYPE": "FLOAT32",
3818+
"DIM": 8,
3819+
"DISTANCE_METRIC": "L2",
3820+
"COMPRESSION": "LeanVec8x8", # LeanVec compression required for REDUCE
3821+
"CONSTRUCTION_WINDOW_SIZE": 200,
3822+
"GRAPH_MAX_DEGREE": 32,
3823+
"SEARCH_WINDOW_SIZE": 15,
3824+
"EPSILON": 0.01,
3825+
"TRAINING_THRESHOLD": 1024,
3826+
"REDUCE": 4, # Half of DIM (8/2 = 4)
3827+
},
3828+
),
3829+
)
3830+
)
3831+
3832+
# Create test vectors (8-dimensional to match DIM)
3833+
vectors = [
3834+
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0],
3835+
[2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0],
3836+
[3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0],
3837+
[4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0],
3838+
[5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0],
3839+
]
3840+
3841+
for i, vec in enumerate(vectors):
3842+
client.hset(f"doc{i}", "v", np.array(vec, dtype=np.float32).tobytes())
3843+
3844+
query = Query("*=>[KNN 3 @v $vec as score]").no_content()
3845+
query_params = {"vec": np.array(vectors[0], dtype=np.float32).tobytes()}
3846+
3847+
res = client.ft().search(query, query_params=query_params)
3848+
if is_resp2_connection(client):
3849+
assert res.total == 3
3850+
assert "doc0" == res.docs[0].id
3851+
else:
3852+
assert res["total_results"] == 3
3853+
assert "doc0" == res["results"][0]["id"]

‎tests/test_vsets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def test_vsim_epsilon(d_client):
437437
assert 5 == len(res1)
438438

439439
res2 = d_client.vset().vsim("myset", [2, 1, 1], epsilon=0.5)
440-
assert 3 == len(res2)
440+
assert 4 == len(res2)
441441

442442

443443
@skip_if_server_version_lt("7.9.0")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /