chore: upgrade Lance and rename score to _distance (#398)

BREAKING CHANGE: The `score` column has been renamed to `_distance` to
more accurately describe the semantics (smaller means closer / better).

---------

Co-authored-by: Lei Xu <lei@lancedb.com>
This commit is contained in:
Will Jones
2023-08-11 21:42:33 -07:00
committed by GitHub
parent 902a402951
commit 722462c38b
10 changed files with 32 additions and 28 deletions

View File

@@ -108,11 +108,11 @@ def test_query_builder_with_metric(table):
.limit(1)
.to_df()
)
assert df_cosine.score[0] == pytest.approx(
assert df_cosine._distance[0] == pytest.approx(
cosine_distance(query, df_cosine.vector[0]),
abs=1e-6,
)
assert 0 <= df_cosine.score[0] <= 1
assert 0 <= df_cosine._distance[0] <= 1
def test_query_builder_with_different_vector_column():