Skip to content

Commit

Permalink
[ML] Do not retry model deployment. (#185012)
Browse files Browse the repository at this point in the history
When deploying a trained model, we should not attempt retries as the
deployment may take longer than the es client's default 30s timeout.
  • Loading branch information
jgowdyelastic authored Jun 13, 2024
1 parent 584f4ee commit 0486de7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions x-pack/plugins/ml/server/routes/trained_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,15 @@ export function trainedModelsRoutes(
routeGuard.fullLicenseAPIGuard(async ({ mlClient, request, response }) => {
try {
const { modelId } = request.params;
const body = await mlClient.startTrainedModelDeployment({
model_id: modelId,
...(request.query ? request.query : {}),
});
const body = await mlClient.startTrainedModelDeployment(
{
model_id: modelId,
...(request.query ? request.query : {}),
},
{
maxRetries: 0,
}
);
return response.ok({
body,
});
Expand Down

0 comments on commit 0486de7

Please sign in to comment.