Skip to content

Commit fbd273b

Browse files
Milvus-doc-botMilvus-doc-bot
authored andcommitted
Generate en docs
1 parent 371879d commit fbd273b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"codeList":["from pymilvus import MilvusClient\n\n# Prepare index building params\nindex_params = MilvusClient.prepare_index_params()\n\nindex_params.add_index(\n field_name=\"your_vector_field_name\", # Name of the vector field to be indexed\n index_type=\"GPU_CAGRA\", # Type of the index to create\n index_name=\"vector_index\", # Name of the index to create\n metric_type=\"L2\", # Metric type used to measure similarity\n params={\n \"intermediate_graph_degree\": 32, # Affects recall and build time by determining the graph’s degree before pruning\n \"graph_degree\": 64, # Affets search performance and recall by setting the graph’s degree after pruning\n \"build_algo\": \"IVF_PQ\", # Selects the graph generation algorithm before pruning\n \"cache_dataset_on_device\": \"true\", # Decides whether to cache the original dataset in GPU memory\n \"adapt_for_cpu\": \"false\", # Decides whether to use GPU for index-building and CPU for search\n } # Index building params\n)\n","search_params = {\n \"params\": {\n \"itopk_size\": 16, # Determines the size of intermediate results kept during the search\n \"search_width\": 8, # Specifies the number of entry points into the CAGRA graph during the search\n }\n}\n\nres = MilvusClient.search(\n collection_name=\"your_collection_name\", # Collection name\n anns_field=\"vector_field\", # Vector field name\n data=[[0.1, 0.2, 0.3, 0.4, 0.5]], # Query vector\n limit=3, # TopK results to return\n search_params=search_params\n)\n"],"headingContent":"GPU_CAGRA","anchorList":[{"label":"GPU_CAGRA","href":"GPUCAGRA","type":1,"isActive":false},{"label":"Build index","href":"Build-index","type":2,"isActive":false},{"label":"Search on index","href":"Search-on-index","type":2,"isActive":false},{"label":"Index params","href":"Index-params","type":2,"isActive":false}]}
1+
{"codeList":["from pymilvus import MilvusClient\n\n# Prepare index building params\nindex_params = MilvusClient.prepare_index_params()\n\nindex_params.add_index(\n field_name=\"your_vector_field_name\", # Name of the vector field to be indexed\n index_type=\"GPU_CAGRA\", # Type of the index to create\n index_name=\"vector_index\", # Name of the index to create\n metric_type=\"L2\", # Metric type used to measure similarity\n params={\n \"intermediate_graph_degree\": 64, # Affects recall and build time by determining the graph’s degree before pruning\n \"graph_degree\": 32, # Affets search performance and recall by setting the graph’s degree after pruning\n \"build_algo\": \"IVF_PQ\", # Selects the graph generation algorithm before pruning\n \"cache_dataset_on_device\": \"true\", # Decides whether to cache the original dataset in GPU memory\n \"adapt_for_cpu\": \"false\", # Decides whether to use GPU for index-building and CPU for search\n } # Index building params\n)\n","search_params = {\n \"params\": {\n \"itopk_size\": 16, # Determines the size of intermediate results kept during the search\n \"search_width\": 8, # Specifies the number of entry points into the CAGRA graph during the search\n }\n}\n\nres = MilvusClient.search(\n collection_name=\"your_collection_name\", # Collection name\n anns_field=\"vector_field\", # Vector field name\n data=[[0.1, 0.2, 0.3, 0.4, 0.5]], # Query vector\n limit=3, # TopK results to return\n search_params=search_params\n)\n"],"headingContent":"GPU_CAGRA","anchorList":[{"label":"GPU_CAGRA","href":"GPUCAGRA","type":1,"isActive":false},{"label":"Build index","href":"Build-index","type":2,"isActive":false},{"label":"Search on index","href":"Search-on-index","type":2,"isActive":false},{"label":"Index params","href":"Index-params","type":2,"isActive":false}]}

localization/v2.6.x/site/en/userGuide/indexes/gpu/gpu-cagra.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ index_params.add_index(
4949
index_name=<span class="hljs-string">&quot;vector_index&quot;</span>, <span class="hljs-comment"># Name of the index to create</span>
5050
metric_type=<span class="hljs-string">&quot;L2&quot;</span>, <span class="hljs-comment"># Metric type used to measure similarity</span>
5151
params={
52-
<span class="hljs-string">&quot;intermediate_graph_degree&quot;</span>: <span class="hljs-number">32</span>, <span class="hljs-comment"># Affects recall and build time by determining the graph’s degree before pruning</span>
53-
<span class="hljs-string">&quot;graph_degree&quot;</span>: <span class="hljs-number">64</span>, <span class="hljs-comment"># Affets search performance and recall by setting the graph’s degree after pruning</span>
52+
<span class="hljs-string">&quot;intermediate_graph_degree&quot;</span>: <span class="hljs-number">64</span>, <span class="hljs-comment"># Affects recall and build time by determining the graph’s degree before pruning</span>
53+
<span class="hljs-string">&quot;graph_degree&quot;</span>: <span class="hljs-number">32</span>, <span class="hljs-comment"># Affets search performance and recall by setting the graph’s degree after pruning</span>
5454
<span class="hljs-string">&quot;build_algo&quot;</span>: <span class="hljs-string">&quot;IVF_PQ&quot;</span>, <span class="hljs-comment"># Selects the graph generation algorithm before pruning</span>
5555
<span class="hljs-string">&quot;cache_dataset_on_device&quot;</span>: <span class="hljs-string">&quot;true&quot;</span>, <span class="hljs-comment"># Decides whether to cache the original dataset in GPU memory</span>
5656
<span class="hljs-string">&quot;adapt_for_cpu&quot;</span>: <span class="hljs-string">&quot;false&quot;</span>, <span class="hljs-comment"># Decides whether to use GPU for index-building and CPU for search</span>

0 commit comments

Comments
 (0)