Inference processor PUT error

I am trying to create a pipeline with the inference processor using my ML model for a continuous transform and i keep getting 400 error.

version: 7.6.2

PUT /_ingest/pipeline/ml_pipeline
{
  "pipeline": {
    "description" : "ml_pipeline",
    "processors": [
      {
        "inference": {
          "model_id": "ml_analysis-xxx",
          "inference_config": {
            "classification": {
              "num_top_classes": 2,
              "results_field": "prediction",
              "top_classes_results_field": "probabilities"
            }
          },
          "field_mappings": {}
        }
      }
    ]
  }
}
{
  "error" : {
    "root_cause" : [
      {
        "type" : "parse_exception",
        "reason" : "[processors] required property is missing",
        "property_name" : "processors"
      }
    ],
    "type" : "parse_exception",
    "reason" : "[processors] required property is missing",
    "property_name" : "processors"
  },
  "status" : 400
}

The solution is to remove the pipeline wrapper object.

PUT /_ingest/pipeline/ml_pipeline
{
  "description": "ml_pipeline",
  "processors": [
    {
      "inference": {
        "model_id": "ml_analysis-xxx",
        "field_mappings": {},
        "inference_config": {
          "classification": {
            "num_top_classes": 2,
            "results_field": "prediction",
            "top_classes_results_field": "probabilities"
          }
        }
      }
    }
  ]
}
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.