{
  "type": "record",
  "name": "MLModelProperties",
  "namespace": "com.linkedin.pegasus2avro.ml.metadata",
  "doc": "Properties associated with a ML Model",
  "fields": [
    {
      "name": "customProperties",
      "type": {
        "type": "map",
        "values": "string"
      },
      "doc": "Custom property bag.",
      "default": {},
      "Searchable": {
        "/*": {
          "queryByDefault": true
        }
      }
    },
    {
      "name": "externalUrl",
      "type": [
        "null",
        "string"
      ],
      "doc": "URL where the reference exist",
      "default": null,
      "java": {
        "class": "com.linkedin.pegasus2avro.common.url.Url",
        "coercerClass": "com.linkedin.pegasus2avro.common.url.UrlCoercer"
      }
    },
    {
      "name": "description",
      "type": [
        "null",
        "string"
      ],
      "doc": "Documentation of the MLModel",
      "default": null,
      "Searchable": {
        "fieldType": "TEXT",
        "hasValuesFieldName": "hasDescription"
      }
    },
    {
      "name": "date",
      "type": [
        "null",
        "long"
      ],
      "doc": "Date when the MLModel was developed",
      "default": null
    },
    {
      "name": "version",
      "type": [
        "null",
        {
          "type": "record",
          "name": "VersionTag",
          "namespace": "com.linkedin.pegasus2avro.common",
          "doc": "A resource-defined string representing the resource state for the purpose of concurrency control",
          "fields": [
            {
              "name": "versionTag",
              "type": [
                "null",
                "string"
              ],
              "default": null
            }
          ]
        }
      ],
      "doc": "Version of the MLModel",
      "default": null
    },
    {
      "name": "type",
      "type": [
        "null",
        "string"
      ],
      "doc": "Type of Algorithm or MLModel such as whether it is a Naive Bayes classifier, Convolutional Neural Network, etc",
      "default": null,
      "Searchable": {
        "fieldType": "TEXT_PARTIAL"
      }
    },
    {
      "name": "hyperParameters",
      "type": [
        "null",
        {
          "type": "map",
          "values": [
            "string",
            "int",
            "float",
            "double",
            "boolean"
          ]
        }
      ],
      "doc": "Hyper Parameters of the MLModel\n\nNOTE: these are deprecated in favor of hyperParams",
      "default": null
    },
    {
      "name": "hyperParams",
      "type": [
        "null",
        {
          "type": "array",
          "items": {
            "type": "record",
            "name": "MLHyperParam",
            "doc": "Properties associated with an ML Hyper Param",
            "fields": [
              {
                "name": "name",
                "type": "string",
                "doc": "Name of the MLHyperParam"
              },
              {
                "name": "description",
                "type": [
                  "null",
                  "string"
                ],
                "doc": "Documentation of the MLHyperParam",
                "default": null
              },
              {
                "name": "value",
                "type": [
                  "null",
                  "string"
                ],
                "doc": "The value of the MLHyperParam",
                "default": null
              },
              {
                "name": "createdAt",
                "type": [
                  "null",
                  "long"
                ],
                "doc": "Date when the MLHyperParam was developed",
                "default": null
              }
            ],
            "Aspect": {
              "name": "mlHyperParam"
            }
          }
        }
      ],
      "doc": "Hyperparameters of the MLModel",
      "default": null
    },
    {
      "name": "trainingMetrics",
      "type": [
        "null",
        {
          "type": "array",
          "items": {
            "type": "record",
            "name": "MLMetric",
            "doc": "Properties associated with an ML Metric",
            "fields": [
              {
                "name": "name",
                "type": "string",
                "doc": "Name of the mlMetric"
              },
              {
                "name": "description",
                "type": [
                  "null",
                  "string"
                ],
                "doc": "Documentation of the mlMetric",
                "default": null
              },
              {
                "name": "value",
                "type": [
                  "null",
                  "string"
                ],
                "doc": "The value of the mlMetric",
                "default": null
              },
              {
                "name": "createdAt",
                "type": [
                  "null",
                  "long"
                ],
                "doc": "Date when the mlMetric was developed",
                "default": null
              }
            ],
            "Aspect": {
              "name": "mlMetric"
            }
          }
        }
      ],
      "doc": "Metrics of the MLModel used in training",
      "default": null
    },
    {
      "name": "onlineMetrics",
      "type": [
        "null",
        {
          "type": "array",
          "items": "MLMetric"
        }
      ],
      "doc": "Metrics of the MLModel used in production",
      "default": null
    },
    {
      "name": "mlFeatures",
      "type": [
        "null",
        {
          "type": "array",
          "items": "string"
        }
      ],
      "doc": "List of features used for MLModel training",
      "default": null
    },
    {
      "name": "tags",
      "type": {
        "type": "array",
        "items": "string"
      },
      "doc": "Tags for the MLModel",
      "default": []
    },
    {
      "name": "deployments",
      "type": [
        "null",
        {
          "type": "array",
          "items": "string"
        }
      ],
      "doc": "Deployments for the MLModel",
      "default": null,
      "Relationship": {
        "/*": {
          "entityTypes": [
            "mlModelDeployment"
          ],
          "name": "DeployedTo"
        }
      }
    },
    {
      "name": "trainingJobs",
      "type": [
        "null",
        {
          "type": "array",
          "items": "string"
        }
      ],
      "doc": "List of jobs (if any) used to train the model",
      "default": null,
      "Relationship": {
        "/*": {
          "entityTypes": [
            "dataJob"
          ],
          "name": "TrainedBy"
        }
      }
    },
    {
      "name": "downstreamJobs",
      "type": [
        "null",
        {
          "type": "array",
          "items": "string"
        }
      ],
      "doc": "List of jobs (if any) that use the model",
      "default": null,
      "Relationship": {
        "/*": {
          "entityTypes": [
            "dataJob"
          ],
          "name": "UsedBy"
        }
      }
    },
    {
      "name": "groups",
      "type": [
        "null",
        {
          "type": "array",
          "items": "string"
        }
      ],
      "doc": "Groups the model belongs to",
      "default": null,
      "Relationship": {
        "/*": {
          "entityTypes": [
            "mlModelGroup"
          ],
          "name": "MemberOf"
        }
      }
    }
  ],
  "Aspect": {
    "name": "mlModelProperties"
  }
}