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

[ML] Fixes inference timeout check in File Upload #204722

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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class AutoDeploy {
// we'll know when it's ready from polling the inference endpoints
// looking for num_allocations
const status = e.response?.status;
if (status === 408 || status === 504 || status === 502) {
if (status === 408 || status === 504 || status === 502 || status === 500) {
return;
}
this.inferError = e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,13 @@ export function routes(coreSetup: CoreSetup<StartDeps, unknown>, logger: Logger)
const inferenceId = request.params.inferenceId;
const input = request.body.input;
const esClient = (await context.core).elasticsearch.client;
const body = await esClient.asCurrentUser.inference.inference({
inference_id: inferenceId,
input,
});
const body = await esClient.asCurrentUser.inference.inference(
{
inference_id: inferenceId,
input,
},
{ maxRetries: 0, requestTimeout: 10 * 60 * 1000 }
);

return response.ok({ body });
} catch (e) {
Expand Down
Loading