-
Notifications
You must be signed in to change notification settings - Fork 196
Add pluggable backend architecture to cuvs-bench #1536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
d37c290
add pluggable backend architecture to cuvs-bench
jnke2016 c7ad0a6
refactor backends by adding paths to Dataset
jnke2016 11b7501
refactor cpp_gbench by aligning JSON config with runners.py and C++ p…
jnke2016 b49d7c3
Add plugin interface with GPU/network pre-flight checks
jnke2016 0c28f30
Introduce BenchmarkOrchestrator to replace run.py using the new backe…
jnke2016 6eb5e9f
Extended the backend registry to also manage config loaders, enabling…
jnke2016 6df87c6
batch multiple indexes per command (matches runners.py)
jnke2016 8856485
batch indexes per command, read algo from config
jnke2016 be459aa
remove auto-registration at import time
jnke2016 4664e4b
group indexes by executable, match runners.py batching
jnke2016 b2c2732
update docstrings
jnke2016 6c39af9
update docstrings
jnke2016 ab74913
update docstrings based on modifications in the API
jnke2016 70060e3
return List[Dict] for search_params to match base.py type
jnke2016 22e5f8d
align search_params type and handle empty Dataset arrays
jnke2016 8870c52
update tests based on changes to backend and rename supports_gpu to r…
jnke2016 7f3e339
update docstring
jnke2016 2b4405d
remove unnecessary indirection to the config
jnke2016 ccbc0ea
simplify path resolution and consolidate registry
jnke2016 32d8d9d
update docstring
jnke2016 426e646
rename variable
jnke2016 d69937d
Add mode, constraints, and n_trials parameters to run_benchmark
jnke2016 71c1e02
Add validation for mode parameter in run_benchmark
jnke2016 2dde74a
Refactor run_benchmark to support sweep/tune mode branching
jnke2016 f875ba5
Add algorithm search spaces for tune mode
jnke2016 7445a75
update docstrings
jnke2016 23ca727
Implement tune mode with Optuna integration
jnke2016 83835a4
update docstrings
jnke2016 45256f5
Add tune mode support in config_loaders for single-config Optuna trials
jnke2016 28dbb77
add fixme regarding YAML file for tune mode
jnke2016 1911aa3
accumulate all trial results in single JSON file and rename variable …
jnke2016 1b8b3a4
Merge remote-tracking branch 'upstream/main' into pluggable-backend
jnke2016 8692b4e
Merge branch 'main' into pluggable-backend
cjnolet 26290c7
Remove unused subprocess output capture
jnke2016 5738316
undo changes to copyright
jnke2016 792bbed
fix style
jnke2016 b114c10
resolve search_params type and time_unit bugs in tests and base.py
jnke2016 5d2d9fb
remove redundant build_param assignment in config_loaders loop
jnke2016 361d3b6
pass append_results via backend config instead of method arg and upda…
jnke2016 fb70018
leverage temp files instead of writing to the current dir
jnke2016 56f360a
throw an exception search=false on tune mode
jnke2016 f0c5743
fix tests by adding missing algo property to DummyBackend
jnke2016 a82cded
Merge remote-tracking branch 'upstream/main' into pluggable-backend
jnke2016 24cc511
deprecate legacy benchmark API
jnke2016 93fee10
fix style
jnke2016 4983c7e
update copyright
jnke2016 f780e5f
update scikit-learn version
jnke2016 323e4a2
upgrade scikit-learn
jnke2016 342a935
remove tmp file
jnke2016 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # | ||
| # SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """ | ||
| cuvs-bench backends package. | ||
|
|
||
| This package provides the plugin architecture for benchmarking various | ||
| vector database backends, including C++ executables, Python libraries, | ||
| and network-based VDB services. | ||
| """ | ||
|
|
||
| from .base import ( | ||
| Dataset, | ||
| BuildResult, | ||
| SearchResult, | ||
| BenchmarkBackend, | ||
| ) | ||
|
|
||
| from .registry import ( | ||
| BackendRegistry, | ||
| get_registry, | ||
| register_backend, | ||
| get_backend, | ||
| ) | ||
|
|
||
| from .cpp_gbench import CppGoogleBenchmarkBackend | ||
|
|
||
| # Auto-register built-in backends | ||
| _registry = get_registry() | ||
| _registry.register("cpp_gbench", CppGoogleBenchmarkBackend) | ||
|
|
||
| __all__ = [ | ||
| # Base classes and data structures | ||
| "Dataset", | ||
| "BuildResult", | ||
| "SearchResult", | ||
| "BenchmarkBackend", | ||
| # Registry | ||
| "BackendRegistry", | ||
| "get_registry", | ||
| "register_backend", | ||
| "get_backend", | ||
| # Built-in backends | ||
| "CppGoogleBenchmarkBackend", | ||
| ] | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a general comment, so adding it here. The module structure has potential circular dependency:
backends/__init__.pyimports fromregistryorchestrator/__init__.pyimports frombackends.registryorchestrator/registry.pyre-exports andcalls _register_builtin_loaders()While Python handles this with caching, the architecture is fragile, I wonder if there might be a better way to architect that part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The auto-registration of the C++ backend at import time was convenient but creates this fragility. Let me think through this.