Skip to content
Merged
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 python/tests/test_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class TestIVFIndexParam:
def test_default(self):
param = IVFIndexParam()
assert param.metric_type == MetricType.IP
assert param.n_list == 0
assert param.n_list == 10
assert param.quantize_type == QuantizeType.UNDEFINED
assert param.type == IndexType.IVF

Expand Down
11 changes: 5 additions & 6 deletions python/zvec/model/param/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@ class IVFIndexParam(VectorIndexParam):
metric_type (MetricType): Distance metric used for similarity computation.
Default is ``MetricType.IP`` (inner product).
n_list (int): Number of clusters (inverted lists) to partition the dataset into.
If set to 0, the system will auto-select a reasonable value based on data size.
Default is 0 (auto).
Default is 10.
n_iters (int): Number of iterations for k-means clustering during index training.
Higher values yield more stable centroids. Default is 10.
use_soar (bool): Whether to enable SOAR (Scalable Optimized Adaptive Routing)
Expand All @@ -469,7 +468,7 @@ class IVFIndexParam(VectorIndexParam):
def __init__(
self,
metric_type: _zvec.typing.MetricType = ...,
n_list: typing.SupportsInt = 0,
n_list: typing.SupportsInt = 10,
n_iters: typing.SupportsInt = 10,
use_soar: bool = False,
quantize_type: _zvec.typing.QuantizeType = ...,
Expand All @@ -479,8 +478,8 @@ class IVFIndexParam(VectorIndexParam):

Args:
metric_type (MetricType, optional): Distance metric. Defaults to MetricType.IP.
n_list (int, optional): Number of inverted lists (clusters). Set to 0 for auto.
Defaults to 0.
n_list (int, optional): Number of inverted lists (clusters).
Defaults to 10.
n_iters (int, optional): Number of k-means iterations during training.
Defaults to 10.
use_soar (bool, optional): Enable SOAR optimization. Defaults to False.
Expand All @@ -504,7 +503,7 @@ class IVFIndexParam(VectorIndexParam):
@property
def n_list(self) -> int:
"""
int: Number of inverted lists (0 = auto).
int: Number of inverted lists.
"""

@property
Expand Down
11 changes: 5 additions & 6 deletions src/binding/python/model/param/python_param.cc
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,7 @@ and accuracy.
metric_type (MetricType): Distance metric used for similarity computation.
Default is ``MetricType.IP`` (inner product).
n_list (int): Number of clusters (inverted lists) to partition the dataset into.
If set to 0, the system will auto-select a reasonable value based on data size.
Default is 0 (auto).
Default is 10.
n_iters (int): Number of iterations for k-means clustering during index training.
Higher values yield more stable centroids. Default is 10.
use_soar (bool): Whether to enable SOAR (Scalable Optimized Adaptive Routing)
Expand All @@ -817,24 +816,24 @@ and accuracy.
)pbdoc");
ivf_params
.def(py::init<MetricType, int, int, bool, QuantizeType>(),
py::arg("metric_type") = MetricType::IP, py::arg("n_list") = 0,
py::arg("metric_type") = MetricType::IP, py::arg("n_list") = 10,
py::arg("n_iters") = 10, py::arg("use_soar") = false,
py::arg("quantize_type") = QuantizeType::UNDEFINED,
R"pbdoc(
Constructs an IVFIndexParam instance.

Args:
metric_type (MetricType, optional): Distance metric. Defaults to MetricType.IP.
n_list (int, optional): Number of inverted lists (clusters). Set to 0 for auto.
Defaults to 0.
n_list (int, optional): Number of inverted lists (clusters).
Defaults to 10.
n_iters (int, optional): Number of k-means iterations during training.
Defaults to 10.
use_soar (bool, optional): Enable SOAR optimization. Defaults to False.
quantize_type (QuantizeType, optional): Vector quantization type.
Defaults to QuantizeType.UNDEFINED.
)pbdoc")
.def_property_readonly("n_list", &IVFIndexParams::n_list,
"int: Number of inverted lists (0 = auto).")
"int: Number of inverted lists.")
.def_property_readonly(
"n_iters", &IVFIndexParams::n_iters,
"int: Number of k-means iterations during training.")
Expand Down
3 changes: 2 additions & 1 deletion tests/db/crash_recovery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

# Crash recovery tests rely on fork()+execvp()+kill() to spawn helper processes
# and simulate crashes. These POSIX process APIs are prohibited on iOS.
if(IOS)
# On Windows the tests also fail consistently, so skip them there as well.
if(IOS OR WIN32)
return()
endif()

Expand Down
Loading