{
  "$id": "https://nirs4all.org/schemas/tuning-summary/v1",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "best_params": {
      "type": "object"
    },
    "best_value": {
      "type": "number"
    },
    "direction": {
      "enum": [
        "maximize",
        "minimize"
      ]
    },
    "engine": {
      "enum": [
        "n4m",
        "optuna"
      ]
    },
    "fingerprint": {
      "type": "string"
    },
    "format": {
      "const": "nirs4all.tuning.summary"
    },
    "metric": {
      "type": "string"
    },
    "n_trials": {
      "minimum": 0,
      "type": "integer"
    },
    "optimizer": {
      "type": "string"
    },
    "persistence": {
      "additionalProperties": false,
      "properties": {
        "optimizer_state_resume_supported": {
          "type": "boolean"
        },
        "resume": {
          "type": "boolean"
        },
        "storage_configured": {
          "type": "boolean"
        },
        "study_name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "optimizer_state_resume_supported",
        "resume",
        "storage_configured",
        "study_name"
      ],
      "type": "object"
    },
    "pruner": {
      "type": [
        "string",
        "null"
      ]
    },
    "sampler": {
      "type": [
        "string",
        "null"
      ]
    },
    "schema_version": {
      "const": 1
    },
    "seed": {
      "type": [
        "integer",
        "null"
      ]
    },
    "trial_states": {
      "additionalProperties": {
        "minimum": 0,
        "type": "integer"
      },
      "type": "object"
    },
    "trials": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "diagnostics": {
            "additionalProperties": {
              "type": [
                "boolean",
                "integer",
                "number",
                "string",
                "null"
              ]
            },
            "type": "object"
          },
          "number": {
            "minimum": 0,
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "value": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "diagnostics",
          "number",
          "state",
          "value"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "version": {
      "const": 1
    }
  },
  "required": [
    "best_params",
    "best_value",
    "direction",
    "engine",
    "fingerprint",
    "format",
    "metric",
    "n_trials",
    "optimizer",
    "persistence",
    "schema_version",
    "trial_states",
    "trials",
    "version"
  ],
  "title": "NIRS4All tuning summary artifact",
  "type": "object"
}
