Skip to content
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

add gpu_cagra index in pymilvus #1759

Merged
merged 1 commit into from
Dec 26, 2023
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
25 changes: 25 additions & 0 deletions pymilvus/client/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,26 @@ def is_legal_nprobe(nprobe: Any) -> bool:
return isinstance(nprobe, int)


def is_legal_itopk_size(itopk_size: Any) -> bool:
return isinstance(itopk_size, int)


def is_legal_search_width(search_width: Any) -> bool:
return isinstance(search_width, int)


def is_legal_min_iterations(min_iterations: Any) -> bool:
return isinstance(min_iterations, int)


def is_legal_max_iterations(max_iterations: Any) -> bool:
return isinstance(max_iterations, int)


def is_legal_team_size(team_size: Any) -> bool:
return isinstance(team_size, int)


def is_legal_cmd(cmd: Any) -> bool:
return cmd and isinstance(cmd, str)

Expand Down Expand Up @@ -298,6 +318,11 @@ def __init__(self) -> None:
"properties": is_legal_collection_properties,
"replica_number": is_legal_replica_number,
"resource_group_name": is_legal_table_name,
"itopk_size": is_legal_itopk_size,
"search_width": is_legal_search_width,
"min_iterations": is_legal_min_iterations,
"max_iterations": is_legal_max_iterations,
"team_size": is_legal_team_size,
}

def check(self, key: str, value: Callable):
Expand Down
3 changes: 3 additions & 0 deletions pymilvus/client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"BIN_IVF_FLAT",
"DISKANN",
"AUTOINDEX",
"GPU_CAGRA",
]

valid_index_params_keys = [
Expand All @@ -33,6 +34,8 @@
"efConstruction",
"PQM",
"n_trees",
"intermediate_graph_degree",
"graph_degree",
]

valid_binary_index_types = [
Expand Down
Loading