{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/staycharted-com/json-schema/staycharted-com-training-job-schema.json",
  "title": "TrainingJob",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/staycharted-com-openapi.yaml#/components/schemas/TrainingJob",
  "type": "object",
  "properties": {
    "jobId": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "description": "queued, running, completed, failed or cancelled."
    },
    "stage": {
      "type": [
        "string",
        "null"
      ],
      "description": "What it is doing now, in words."
    },
    "failure": {
      "type": [
        "string",
        "null"
      ]
    },
    "report": {
      "type": [
        "object",
        "null"
      ],
      "description": "The test on held-out rows, once completed.",
      "properties": {
        "versionId": {
          "type": "string",
          "format": "uuid"
        },
        "isLive": {
          "type": "boolean"
        },
        "accuracy": {
          "type": [
            "number",
            "null"
          ]
        },
        "baseline": {
          "type": [
            "number",
            "null"
          ],
          "description": "Always guessing the commonest category."
        },
        "testedOn": {
          "type": [
            "integer",
            "null"
          ]
        },
        "trainedOn": {
          "type": [
            "integer",
            "null"
          ]
        },
        "perCategory": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "category": {
                "type": "string"
              },
              "accuracy": {
                "type": "number"
              },
              "correct": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            }
          }
        }
      }
    }
  }
}