Skip to content

Commit 724f271

Browse files
Add ml.update_trained_model_deployment API (#2564) (#2575)
(cherry picked from commit 4195183) Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
1 parent 4279c2b commit 724f271

File tree

5 files changed

+182
-10
lines changed

5 files changed

+182
-10
lines changed

output/schema/schema.json

Lines changed: 95 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { Id } from '@_types/common'
22+
import { integer } from '@_types/Numeric'
23+
24+
/**
25+
* Starts a trained model deployment, which allocates the model to every machine learning node.
26+
* @rest_spec_name ml.update_trained_model_deployment
27+
* @availability stack since=8.6.0 stability=stable
28+
* @availability serverless stability=beta visibility=public
29+
* @cluster_privileges manage_ml
30+
*/
31+
export interface Request extends RequestBase {
32+
path_parts: {
33+
/**
34+
* The unique identifier of the trained model. Currently, only PyTorch models are supported.
35+
*/
36+
model_id: Id
37+
}
38+
body: {
39+
/**
40+
* The number of model allocations on each node where the model is deployed.
41+
* All allocations on a node share the same copy of the model in memory but use
42+
* a separate set of threads to evaluate the model.
43+
* Increasing this value generally increases the throughput.
44+
* If this setting is greater than the number of hardware threads
45+
* it will automatically be changed to a value less than the number of hardware threads.
46+
* @server_default 1
47+
*/
48+
number_of_allocations?: integer
49+
}
50+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { TrainedModelAssignment } from '../_types/TrainedModel'
21+
22+
export class Response {
23+
body: {
24+
assignment: TrainedModelAssignment
25+
}
26+
}

0 commit comments

Comments
 (0)