@@ -2375,6 +2375,7 @@ public function startDatafeed(array $params = [])
2375
2375
* cache_size: string, // A byte-size value for configuring the inference cache size. For example, 20mb.
2376
2376
* number_of_allocations: int, // The total number of allocations this model is assigned across machine learning nodes.
2377
2377
* threads_per_allocation: int, // The number of threads used by each model allocation during inference.
2378
+ * priority: string, // The deployment priority.
2378
2379
* queue_capacity: int, // Controls how many inference requests are allowed in the queue at a time.
2379
2380
* timeout: time, // Controls the amount of time to wait for the model to deploy.
2380
2381
* wait_for: string, // The allocation status for which to wait
@@ -2398,7 +2399,7 @@ public function startTrainedModelDeployment(array $params = [])
2398
2399
$ url = '/_ml/trained_models/ ' . $ this ->encode ($ params ['model_id ' ]) . '/deployment/_start ' ;
2399
2400
$ method = 'POST ' ;
2400
2401
2401
- $ url = $ this ->addQueryString ($ url , $ params , ['cache_size ' ,'number_of_allocations ' ,'threads_per_allocation ' ,'queue_capacity ' ,'timeout ' ,'wait_for ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2402
+ $ url = $ this ->addQueryString ($ url , $ params , ['cache_size ' ,'number_of_allocations ' ,'threads_per_allocation ' ,'priority ' , ' queue_capacity ' ,'timeout ' ,'wait_for ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2402
2403
$ headers = [
2403
2404
'Accept ' => 'application/json ' ,
2404
2405
'Content-Type ' => 'application/json ' ,
@@ -2717,6 +2718,43 @@ public function updateModelSnapshot(array $params = [])
2717
2718
}
2718
2719
2719
2720
2721
+ /**
2722
+ * Updates certain properties of trained model deployment.
2723
+ *
2724
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-trained-model-deployment.html
2725
+ *
2726
+ * @param array{
2727
+ * model_id: string, // (REQUIRED) The unique identifier of the trained model.
2728
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2729
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2730
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2731
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2732
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
2733
+ * body: array, // (REQUIRED) The updated trained model deployment settings
2734
+ * } $params
2735
+ *
2736
+ * @throws MissingParameterException if a required parameter is missing
2737
+ * @throws NoNodeAvailableException if all the hosts are offline
2738
+ * @throws ClientResponseException if the status code of response is 4xx
2739
+ * @throws ServerResponseException if the status code of response is 5xx
2740
+ *
2741
+ * @return Elasticsearch|Promise
2742
+ */
2743
+ public function updateTrainedModelDeployment (array $ params = [])
2744
+ {
2745
+ $ this ->checkRequiredParameters (['model_id ' ,'body ' ], $ params );
2746
+ $ url = '/_ml/trained_models/ ' . $ this ->encode ($ params ['model_id ' ]) . '/deployment/_update ' ;
2747
+ $ method = 'POST ' ;
2748
+
2749
+ $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2750
+ $ headers = [
2751
+ 'Accept ' => 'application/json ' ,
2752
+ 'Content-Type ' => 'application/json ' ,
2753
+ ];
2754
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
2755
+ }
2756
+
2757
+
2720
2758
/**
2721
2759
* Upgrades a given job snapshot to the current major version.
2722
2760
*
0 commit comments