mirror of
https://github.com/lancedb/lancedb.git
synced 2026-06-06 05:40:40 +00:00
fix: metric type inconsistency (#2122)
PR fixes #2113 --------- Co-authored-by: Will Jones <willjones127@gmail.com>
This commit is contained in:
@@ -452,7 +452,7 @@ def test_query_builder_with_metric(table):
|
||||
df_default = LanceVectorQueryBuilder(table, query, vector_column_name).to_pandas()
|
||||
df_l2 = (
|
||||
LanceVectorQueryBuilder(table, query, vector_column_name)
|
||||
.distance_type("L2")
|
||||
.distance_type("l2")
|
||||
.to_pandas()
|
||||
)
|
||||
tm.assert_frame_equal(df_default, df_l2)
|
||||
|
||||
@@ -480,7 +480,7 @@ def test_create_index_method(mock_create_index, mem_db: DBConnection):
|
||||
)
|
||||
|
||||
table.create_index(
|
||||
metric="L2",
|
||||
metric="l2",
|
||||
num_partitions=256,
|
||||
num_sub_vectors=96,
|
||||
vector_column_name="vector",
|
||||
@@ -489,7 +489,7 @@ def test_create_index_method(mock_create_index, mem_db: DBConnection):
|
||||
num_bits=4,
|
||||
)
|
||||
expected_config = IvfPq(
|
||||
distance_type="L2",
|
||||
distance_type="l2",
|
||||
num_partitions=256,
|
||||
num_sub_vectors=96,
|
||||
num_bits=4,
|
||||
@@ -1237,7 +1237,7 @@ def test_hybrid_search_metric_type(tmp_db: DBConnection):
|
||||
# This test uses an FTS index
|
||||
pytest.importorskip("lancedb.fts")
|
||||
|
||||
# Need to use nonnorm as the embedding function so L2 and dot results
|
||||
# Need to use nonnorm as the embedding function so l2 and dot results
|
||||
# are different
|
||||
table, _, _ = setup_hybrid_search_table(tmp_db, "nonnorm")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user