Skip to content

Commit

Permalink
pymilvus support cagra
Browse files Browse the repository at this point in the history
Signed-off-by: cqy123456 <[email protected]>
  • Loading branch information
cqy123456 committed Dec 15, 2023
1 parent f12777b commit d15c7a4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
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

0 comments on commit d15c7a4

Please sign in to comment.