plugin/src/main/java/org/opensearch/ml/rest/RestMLTrainAndPredictAction.java [62:71]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @VisibleForTesting
    MLTrainingTaskRequest getRequest(RestRequest request) throws IOException {
        String algorithm = getAlgorithm(request);
        boolean async = isAsync(request);

        XContentParser parser = request.contentParser();
        ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser);
        MLInput mlInput = MLInput.parse(parser, algorithm);

        return new MLTrainingTaskRequest(mlInput, async);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



plugin/src/main/java/org/opensearch/ml/rest/RestMLTrainingAction.java [61:70]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @VisibleForTesting
    MLTrainingTaskRequest getRequest(RestRequest request) throws IOException {
        String algorithm = getAlgorithm(request);
        boolean async = isAsync(request);

        XContentParser parser = request.contentParser();
        ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser);
        MLInput mlInput = MLInput.parse(parser, algorithm);

        return new MLTrainingTaskRequest(mlInput, async);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



