v2

latestOpenAPI 3.1.02026-07-26143251806.6 KB
reports

Configure Custom Scoring

patch/reports/{report_id}/score-card

Path parameters

report_idinteger required

ID of the evaluation pipeline to update.

Request body

column_namesstring[] required

Column names to include in the score calculation.

codestring nullable

Optional custom Python or JavaScript scoring code. The code receives data and must return an object with a score key.

code_language'PYTHON' | 'JAVASCRIPT'

Language used by the custom scoring code.

Response

Score card updated.

successtrue required

Example response

{
  "report": {
    "score_configuration": {
      "code": "score = sum(1 for row in data if row.get(\"Accuracy Check\") is True) / len(data) * 100 if data else 0\nreturn {\"score\": score}",
      "code_language": "PYTHON"
    }
  }
}