Properly feature-gate diskann-benchmark#1245
Conversation
94349e7 to
6f2053a
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates diskann-benchmark to use diskann-benchmark-runner’s native gated/partially-gated registration APIs (introduced in #1242), improving discoverability and diagnostics when benchmarks/inputs are unavailable due to missing Cargo features.
Changes:
- Removes the legacy
stub_impl!-based approach and replaces it withRegistry::{register_partially_gated, register_gated}across benchmark modules. - Makes
bftreebenchmarks always “present” at the module level while registering gated placeholders when thebftreefeature is disabled. - Updates UX tests/assertions in
main.rsto match the new gated-feature error message wording.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| diskann-benchmark/src/utils/mod.rs | Removes the old stub_impl! macro used for feature-gated benchmark stubs. |
| diskann-benchmark/src/multi_vector/mod.rs | Switches multi-vector gating from stub benchmarks to register_partially_gated. |
| diskann-benchmark/src/main.rs | Updates test expectations to match new “feature …” error message wording. |
| diskann-benchmark/src/index/mod.rs | Always includes bftree module and delegates gating behavior into bftree::register_benchmarks. |
| diskann-benchmark/src/index/inmem/spherical.rs | Uses register_partially_gated when spherical-quantization is disabled. |
| diskann-benchmark/src/index/inmem/scalar.rs | Uses register_partially_gated when scalar-quantization is disabled. |
| diskann-benchmark/src/index/inmem/product.rs | Uses register_partially_gated when product-quantization is disabled. |
| diskann-benchmark/src/index/bftree/mod.rs | Adds bftree-disabled path registering fully-gated input+benchmark placeholders. |
| diskann-benchmark/src/exhaustive/spherical.rs | Uses register_partially_gated when spherical-quantization is disabled. |
| diskann-benchmark/src/exhaustive/product.rs | Uses register_partially_gated when product-quantization is disabled. |
| diskann-benchmark/src/exhaustive/minmax.rs | Uses register_partially_gated when minmax-quantization is disabled. |
| diskann-benchmark/src/disk_index/mod.rs | Uses register_partially_gated when disk-index is disabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (75.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1245 +/- ##
==========================================
+ Coverage 90.11% 91.12% +1.00%
==========================================
Files 507 510 +3
Lines 96776 96799 +23
==========================================
+ Hits 87214 88208 +994
+ Misses 9562 8591 -971
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This is a follow-up to #1242 to move
diskann-benchmarkto the new feature gated feature.A summary of the updated error messages is shown below:
When trying to load
bf-treeinputsCommand
Before
After
When trying to run a gated benchmark
Command
Before
After
Input Discovery
When running
cargo run --package diskann-benchmark -- inputs --all, the following is now displayed