bug: build_ivf_model panics when num_partitions is unset
Description
build_ivf_model in rust/lance/src/index/vector/ivf.rs starts with
let num_partitions = params.num_partitions.unwrap();IvfBuildParams::num_partitions is an Option (it is deprecated in favour of target_partition_size, and IvfBuildParams::default() leaves both unset), and build_ivf_model is public, so a caller that sets neither gets a panic out of a library call. The two sibling trainers in the same file already handle it: build_ivf_model_and_pq uses ivf_params.num_partitions.unwrap_or(32) with the comment "we use 32 as the default to avoid panicking, 32 is the default value before we make num_partitions optional", and do_train_ivf_model does the same.
The in-tree index build paths fill num_partitions in before calling this, so this is about the public function's own contract.
Expected behavior
Fall back to the same default the sibling trainers use rather than unwrapping None.
Lance version
13.0.0-beta.4 (main)
Language binding
Rust
Source: lance-format/lance