Skip to content

Commit 2f58ac1

Browse files
[8.5][ML] Increase timeout for _infer in PyTorchModelIT (#91875)
This is a manual backport of #91853 as the code is a bit different in the 8.5 branch.
1 parent a333ff8 commit 2f58ac1

File tree

1 file changed

+2
-2
lines changed
  • x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration

1 file changed

+2
-2
lines changed

x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/PyTorchModelIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,15 +989,15 @@ private Response infer(String input, String modelId, TimeValue timeout) throws I
989989
}
990990

991991
private Response infer(String input, String modelId) throws IOException {
992-
Request request = new Request("POST", "/_ml/trained_models/" + modelId + "/_infer");
992+
Request request = new Request("POST", "/_ml/trained_models/" + modelId + "/_infer?timeout=30s");
993993
request.setJsonEntity("""
994994
{ "docs": [{"input":"%s"}] }
995995
""".formatted(input));
996996
return client().performRequest(request);
997997
}
998998

999999
private Response infer(String input, String modelId, String resultsField) throws IOException {
1000-
Request request = new Request("POST", "/_ml/trained_models/" + modelId + "/_infer");
1000+
Request request = new Request("POST", "/_ml/trained_models/" + modelId + "/_infer?timeout=30s");
10011001
request.setJsonEntity("""
10021002
{
10031003
"docs": [ { "input": "%s" } ],

0 commit comments

Comments
 (0)