@@ -72,7 +72,10 @@ public List<Route> routes() {
72
72
String .format (Locale .ROOT , "%s/_predict/{%s}/{%s}" , ML_BASE_URI , PARAMETER_ALGORITHM , PARAMETER_MODEL_ID )
73
73
),
74
74
new Route (RestRequest .Method .POST , String .format (Locale .ROOT , "%s/models/{%s}/_predict" , ML_BASE_URI , PARAMETER_MODEL_ID )),
75
- new Route (RestRequest .Method .POST , String .format (Locale .ROOT , "%s/models/{%s}/_batch" , ML_BASE_URI , PARAMETER_MODEL_ID ))
75
+ new Route (
76
+ RestRequest .Method .POST ,
77
+ String .format (Locale .ROOT , "%s/models/{%s}/_batch_predict" , ML_BASE_URI , PARAMETER_MODEL_ID )
78
+ )
76
79
);
77
80
}
78
81
@@ -124,11 +127,13 @@ public RestChannelConsumer prepareRequest(RestRequest request, NodeClient client
124
127
@ VisibleForTesting
125
128
MLPredictionTaskRequest getRequest (String modelId , String algorithm , RestRequest request ) throws IOException {
126
129
ActionType actionType = ActionType .from (getActionTypeFromRestRequest (request ));
130
+ System .out .println ("actionType is " + actionType );
127
131
if (FunctionName .REMOTE .name ().equals (algorithm ) && !mlFeatureEnabledSetting .isRemoteInferenceEnabled ()) {
128
132
throw new IllegalStateException (REMOTE_INFERENCE_DISABLED_ERR_MSG );
129
133
} else if (FunctionName .isDLModel (FunctionName .from (algorithm .toUpperCase ())) && !mlFeatureEnabledSetting .isLocalModelEnabled ()) {
130
134
throw new IllegalStateException (LOCAL_MODEL_DISABLED_ERR_MSG );
131
135
} else if (!ActionType .isValidActionInModelPrediction (actionType )) {
136
+ System .out .println (actionType .toString ());
132
137
throw new IllegalArgumentException ("Wrong action type in the rest request path!" );
133
138
}
134
139
0 commit comments