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

Added spec for k-NN warmup api #191

Merged
merged 2 commits into from
Mar 7, 2024
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
23 changes: 23 additions & 0 deletions model/knn/warmup/operations.smithy
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: Apache-2.0
//
// The OpenSearch Contributors require contributions made to
// this file be licensed under the Apache-2.0 license or a
// compatible open source license.

$version: "2"
namespace OpenSearch

@externalDocumentation(
"API Reference": "https://opensearch.org/docs/latest/search-plugins/knn/api/#warmup-operation"
)

@xOperationGroup("knn.warmup")
@xVersionAdded("1.0")
@readonly
@suppress(["HttpUriConflict"])
@http(method: "GET", uri: "/_plugins/_knn/warmup/{index}")
@documentation("Preloads native library files into memory, reducing initial search latency for specified indexes")
operation KNNWarmup {
input: KNNWarmup_Input,
output: KNNWarmup_Output
}
18 changes: 18 additions & 0 deletions model/knn/warmup/structures.smithy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: Apache-2.0
//
// The OpenSearch Contributors require contributions made to
// this file be licensed under the Apache-2.0 license or a
// compatible open source license.

$version: "2"
namespace OpenSearch

@input
structure KNNWarmup_Input {
@required
@httpLabel
index: PathIndices,
}

// TODO: Fill in Output Structure
structure KNNWarmup_Output{}
1 change: 1 addition & 0 deletions model/opensearch.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ service OpenSearch {
KNNSearchModels_Post,
KNNTrainModel,
KNNTrainModel_WithModelId,
KNNWarmup,
Mget_Get,
Mget_Get_WithIndex,
Mget_Post,
Expand Down
Loading