mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-17 01:02:28 +00:00
docs: regenerate the vector-index snippets the page imports
Porting the upstream changes replaced snippets/indexing.mdx with a hand copy from lancedb/docs, which dropped six exports the vector-index page still imports (`mint validate` warns on each) and added PyQuantizationCustomParams, which had no source here. The quantization test region is ported from lancedb/docs and the module is regenerated, so every export comes from a test again. The regenerated PyQuantizationCustomParams matches the copy byte for byte. Also fixes "convetion" and "entires" on the page.
This commit is contained in:
@@ -336,6 +336,25 @@ def test_vector_index_binary(tmp_db):
|
||||
assert not df.empty
|
||||
|
||||
|
||||
def test_quantization_custom_params(tmp_db):
|
||||
table = tmp_db.create_table(
|
||||
"quantization-custom-params",
|
||||
_make_vector_rows(256, 64),
|
||||
mode="overwrite",
|
||||
)
|
||||
|
||||
# --8<-- [start:quantization_custom_params]
|
||||
table.create_index(
|
||||
index_type="IVF_RQ",
|
||||
num_bits=2,
|
||||
max_iterations=100,
|
||||
sample_rate=512,
|
||||
)
|
||||
# --8<-- [end:quantization_custom_params]
|
||||
|
||||
assert table.list_indices()
|
||||
|
||||
|
||||
def test_vector_index_check_status(tmp_db):
|
||||
table = tmp_db.create_table(
|
||||
"vector_index_check_status",
|
||||
|
||||
Reference in New Issue
Block a user