Skip to content

Evaluate API fails when there is type mismatch between actual and predicted fields. #54079

@przemekwitek

Description

@przemekwitek

If fields (actualField, predictedField) are misconfigured and it happens that their mapping types differ (e.g. long vs boolean) then Evaluate API fails with non-intuitive error message mentioning script failure (the script we are using internally to calculate the metrics).

Example failures:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "script_exception",
        "reason" : "runtime error",
        "script_stack" : [
          "java.base/java.lang.Class.cast(Class.java:3604)",
          "doc['mal_count'].value == doc['ml.label_prediction'].value",
          "                                                    ^---- HERE"
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Can't parse boolean value [1337x], expected [true] or [false]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    :mlMachine learning>bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions