{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://voltdb.com/voltsp/schemas/resource/mlflow-model",
  "title" : "Mlflow-model Resource Configuration",
  "description" : "This `mlflow-model` resource integrates with the MLflow model registry to track and download a machine learning model.\nIt monitors the registry for a new model version and notifies registered listeners, allowing other plugins\nto automatically reload that model when updates are available.\n\nSee the official MLflow [documentation](https://mlflow.org/docs/latest/model-registry.html) for more information.\n\n## Model Registry\n\nConnects to an MLflow tracking server and monitors a specific registered model as configured. When a new version is detected,\nthe model is downloaded and made available to other pipeline components.\n\n## Model Download\n\nModels are downloaded to a local cache directory and can be reused across pipeline restarts.\nThe cache can be configured with size limits and expiration policies.\n",
  "type" : "object",
  "properties" : {
    "mlflow-model" : {
      "type" : "object",
      "properties" : {
        "trackingUri" : {
          "type" : "string",
          "format" : "uri",
          "description" : "URI to the MLflow tracking server."
        },
        "modelName" : {
          "type" : "string",
          "description" : "Name of the registered model to monitor."
        },
        "pollInterval" : {
          "type" : "string",
          "pattern" : "^(\\d+[smhd]|P(T|\\d+[YMD]).*)",
          "description" : "Interval for polling the MLflow registry for new model versions.",
          "default" : "60s"
        },
        "stage" : {
          "type" : "string",
          "description" : "Specific model stage to monitor (e.g., 'Production', 'Staging'). If not specified, monitors the latest version."
        },
        "authToken" : {
          "type" : "string",
          "description" : "Authentication token for MLflow tracking server.",
          "default" : ""
        },
        "cacheDirectory" : {
          "type" : "string",
          "description" : "Directory where downloaded model files will be cached. If not specified, a temporary directory will be created."
        }
      },
      "required" : [ "trackingUri", "modelName" ],
      "additionalProperties" : false
    }
  },
  "required" : [ "mlflow-model" ],
  "additionalProperties" : false
}
