Skip to content

Custom Scoring metrics

Use the endpoints described below to manage custom scoring metrics.

List Custom Scoring Metrics

Operation path: GET /api/v2/customScoringMetrics/

Authentication requirements: BearerAuth

List all custom scoring metrics, optionally filtered by target type or search.

Parameters

Name In Type Required Description
targetType query string false Filter by target type.
search query string false Search by metric name.
isArchived query boolean false Include archived metrics.
offset query integer false Pagination offset.
limit query integer false Pagination limit.

Enumerated Values

Parameter Value
targetType [Regression, Binary, Multiclass, regression, binary, multiclass]

Example responses

200 Response

{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metrics.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Description.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Metric id.",
            "type": "string"
          },
          "isArchived": {
            "description": "Archived flag.",
            "type": "boolean"
          },
          "latestVersionNum": {
            "description": "Latest version number.",
            "type": "integer"
          },
          "name": {
            "description": "Name.",
            "type": "string"
          },
          "organizationId": {
            "description": "Organization id.",
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "default": [],
            "description": "Tags.",
            "items": {
              "properties": {
                "name": {
                  "description": "Name of the tag.",
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                "value": {
                  "description": "Value of the tag.",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "value"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 50,
            "type": "array"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "updatedAt": {
            "description": "Last updated timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "Creator user id.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "isArchived",
          "latestVersionNum",
          "name",
          "targetType",
          "userId"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
200 OK none CustomScoringMetricListResponse

Create A Custom Scoring Metric

Operation path: POST /api/v2/customScoringMetrics/

Authentication requirements: BearerAuth

Create a new custom scoring metric container for a given target type.

Body parameter

{
  "properties": {
    "description": {
      "description": "Description of the custom scoring metric.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Name of the custom scoring metric.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "default": [],
      "description": "Optional tags for the custom scoring metric.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type for this metric (regression, binary, or multiclass).",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    }
  },
  "required": [
    "name",
    "targetType"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Parameters

Name In Type Required Description
body body CustomScoringMetricCreate false none

Example responses

201 Response

{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
201 Created none CustomScoringMetricResponse

Delete A Custom Scoring Metric By Metric Id by metric ID

Operation path: DELETE /api/v2/customScoringMetrics/{metricId}/

Authentication requirements: BearerAuth

Archive (soft-delete) a custom scoring metric.

Parameters

Name In Type Required Description
metricId path string true The ID of the custom scoring metric.

Responses

Status Meaning Description Schema
204 No Content none None

Retrieve A Custom Scoring Metric By Metric Id by metric ID

Operation path: GET /api/v2/customScoringMetrics/{metricId}/

Authentication requirements: BearerAuth

Get details of a single custom scoring metric.

Parameters

Name In Type Required Description
metricId path string true The ID of the custom scoring metric.

Example responses

200 Response

{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
200 OK none CustomScoringMetricResponse

Update A Custom Scoring Metric By Metric Id by metric ID

Operation path: PATCH /api/v2/customScoringMetrics/{metricId}/

Authentication requirements: BearerAuth

Update the name, description, or tags of a custom scoring metric.

Body parameter

{
  "properties": {
    "description": {
      "description": "Updated description.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Updated name.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "description": "Updated tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}

Parameters

Name In Type Required Description
metricId path string true The ID of the custom scoring metric.
body body CustomScoringMetricUpdate false none

Example responses

200 Response

{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
200 OK none CustomScoringMetricResponse

List versions Of A Custom Scoring Metric By Metric Id by metric ID

Operation path: GET /api/v2/customScoringMetrics/{metricId}/versions/

Authentication requirements: BearerAuth

List all versions for a given custom scoring metric.

Parameters

Name In Type Required Description
offset query integer false Pagination offset.
limit query integer false Pagination limit.
metricId path string true The ID of the custom scoring metric.

Example responses

200 Response

{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metric versions.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "customScoringMetricRegistryId": {
            "description": "Parent metric id.",
            "type": "string"
          },
          "description": {
            "description": "Version notes.",
            "type": [
              "string",
              "null"
            ]
          },
          "filesCatalogId": {
            "description": "Files catalog id backing this version.",
            "type": "string"
          },
          "filesCatalogVersionId": {
            "description": "Files catalog version id.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Version id.",
            "type": "string"
          },
          "metrics": {
            "default": [],
            "description": "Parsed metric definitions.",
            "items": {
              "properties": {
                "description": {
                  "default": "Untitled",
                  "description": "Custom metric description.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "entryPoint": {
                  "description": "Custom metric function entry point in the Python code on lrs.",
                  "type": "string"
                },
                "label": {
                  "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
                  "type": "string"
                },
                "lowerIsBetter": {
                  "default": true,
                  "description": "Indicates whether to maximize or minimize the metric function.",
                  "type": "boolean"
                },
                "name": {
                  "description": "Custom metrics function name. must match the Python code function name.",
                  "type": "string"
                },
                "primaryMetric": {
                  "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
                  "type": "boolean"
                },
                "useWeights": {
                  "default": false,
                  "description": "Indicates whether this metric is using weights.",
                  "type": "boolean"
                }
              },
              "required": [
                "entryPoint",
                "label",
                "name",
                "primaryMetric"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 100,
            "type": "array"
          },
          "stage": {
            "description": "Lifecycle stage.",
            "enum": [
              "draft",
              "Draft",
              "DRAFT",
              "registered",
              "Registered",
              "REGISTERED",
              "archived",
              "Archived",
              "ARCHIVED"
            ],
            "type": "string"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "userId": {
            "description": "Creator user id.",
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "description": "Validation status.",
            "enum": [
              "pending",
              "Pending",
              "PENDING",
              "valid",
              "Valid",
              "VALID",
              "invalid",
              "Invalid",
              "INVALID"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "versionNum": {
            "description": "Version number.",
            "type": "integer"
          }
        },
        "required": [
          "customScoringMetricRegistryId",
          "filesCatalogId",
          "id",
          "stage",
          "targetType",
          "versionNum"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
200 OK none CustomScoringMetricVersionListResponse

Upload A New Version Of A Custom Scoring Metric By Metric Id by metric ID

Operation path: POST /api/v2/customScoringMetrics/{metricId}/versions/

Authentication requirements: BearerAuth

Upload metadata.yaml and custom_metrics.py to create a new version. Files are submitted as multipart form data (metadataFile and codeFile).

Body parameter

{
  "properties": {
    "description": {
      "description": "Version-level notes.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}

Parameters

Name In Type Required Description
metricId path string true The ID of the custom scoring metric.
body body CustomScoringMetricVersionCreate false none

Example responses

201 Response

{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "customScoringMetricRegistryId": {
      "description": "Parent metric id.",
      "type": "string"
    },
    "description": {
      "description": "Version notes.",
      "type": [
        "string",
        "null"
      ]
    },
    "filesCatalogId": {
      "description": "Files catalog id backing this version.",
      "type": "string"
    },
    "filesCatalogVersionId": {
      "description": "Files catalog version id.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Version id.",
      "type": "string"
    },
    "metrics": {
      "default": [],
      "description": "Parsed metric definitions.",
      "items": {
        "properties": {
          "description": {
            "default": "Untitled",
            "description": "Custom metric description.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryPoint": {
            "description": "Custom metric function entry point in the Python code on lrs.",
            "type": "string"
          },
          "label": {
            "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
            "type": "string"
          },
          "lowerIsBetter": {
            "default": true,
            "description": "Indicates whether to maximize or minimize the metric function.",
            "type": "boolean"
          },
          "name": {
            "description": "Custom metrics function name. must match the Python code function name.",
            "type": "string"
          },
          "primaryMetric": {
            "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
            "type": "boolean"
          },
          "useWeights": {
            "default": false,
            "description": "Indicates whether this metric is using weights.",
            "type": "boolean"
          }
        },
        "required": [
          "entryPoint",
          "label",
          "name",
          "primaryMetric"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 100,
      "type": "array"
    },
    "stage": {
      "description": "Lifecycle stage.",
      "enum": [
        "draft",
        "Draft",
        "DRAFT",
        "registered",
        "Registered",
        "REGISTERED",
        "archived",
        "Archived",
        "ARCHIVED"
      ],
      "type": "string"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "userId": {
      "description": "Creator user id.",
      "type": [
        "string",
        "null"
      ]
    },
    "validationStatus": {
      "description": "Validation status.",
      "enum": [
        "pending",
        "Pending",
        "PENDING",
        "valid",
        "Valid",
        "VALID",
        "invalid",
        "Invalid",
        "INVALID"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "versionNum": {
      "description": "Version number.",
      "type": "integer"
    }
  },
  "required": [
    "customScoringMetricRegistryId",
    "filesCatalogId",
    "id",
    "stage",
    "targetType",
    "versionNum"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
201 Created none CustomScoringMetricVersionResponse

Delete A Custom Scoring Metric Version By Metric Id by metric ID

Operation path: DELETE /api/v2/customScoringMetrics/{metricId}/versions/{versionId}/

Authentication requirements: BearerAuth

Delete a specific version of a custom scoring metric.

Parameters

Name In Type Required Description
metricId path string true The ID of the custom scoring metric.
versionId path string true The ID of the custom scoring metric version.

Responses

Status Meaning Description Schema
204 No Content none None

Retrieve A Custom Scoring Metric Version By Metric Id by metric ID

Operation path: GET /api/v2/customScoringMetrics/{metricId}/versions/{versionId}/

Authentication requirements: BearerAuth

Get details of a single custom scoring metric version.

Parameters

Name In Type Required Description
metricId path string true The ID of the custom scoring metric.
versionId path string true The ID of the custom scoring metric version.

Example responses

200 Response

{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "customScoringMetricRegistryId": {
      "description": "Parent metric id.",
      "type": "string"
    },
    "description": {
      "description": "Version notes.",
      "type": [
        "string",
        "null"
      ]
    },
    "filesCatalogId": {
      "description": "Files catalog id backing this version.",
      "type": "string"
    },
    "filesCatalogVersionId": {
      "description": "Files catalog version id.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Version id.",
      "type": "string"
    },
    "metrics": {
      "default": [],
      "description": "Parsed metric definitions.",
      "items": {
        "properties": {
          "description": {
            "default": "Untitled",
            "description": "Custom metric description.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryPoint": {
            "description": "Custom metric function entry point in the Python code on lrs.",
            "type": "string"
          },
          "label": {
            "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
            "type": "string"
          },
          "lowerIsBetter": {
            "default": true,
            "description": "Indicates whether to maximize or minimize the metric function.",
            "type": "boolean"
          },
          "name": {
            "description": "Custom metrics function name. must match the Python code function name.",
            "type": "string"
          },
          "primaryMetric": {
            "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
            "type": "boolean"
          },
          "useWeights": {
            "default": false,
            "description": "Indicates whether this metric is using weights.",
            "type": "boolean"
          }
        },
        "required": [
          "entryPoint",
          "label",
          "name",
          "primaryMetric"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 100,
      "type": "array"
    },
    "stage": {
      "description": "Lifecycle stage.",
      "enum": [
        "draft",
        "Draft",
        "DRAFT",
        "registered",
        "Registered",
        "REGISTERED",
        "archived",
        "Archived",
        "ARCHIVED"
      ],
      "type": "string"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "userId": {
      "description": "Creator user id.",
      "type": [
        "string",
        "null"
      ]
    },
    "validationStatus": {
      "description": "Validation status.",
      "enum": [
        "pending",
        "Pending",
        "PENDING",
        "valid",
        "Valid",
        "VALID",
        "invalid",
        "Invalid",
        "INVALID"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "versionNum": {
      "description": "Version number.",
      "type": "integer"
    }
  },
  "required": [
    "customScoringMetricRegistryId",
    "filesCatalogId",
    "id",
    "stage",
    "targetType",
    "versionNum"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
200 OK none CustomScoringMetricVersionResponse

Retrieve A Custom Scoring Metric Version's File Contents By Metric Id by metric ID

Operation path: GET /api/v2/customScoringMetrics/{metricId}/versions/{versionId}/files/

Authentication requirements: BearerAuth

Get the raw metadata.yaml and custom_metrics.py file contents for a specific custom scoring metric version.

Parameters

Name In Type Required Description
metricId path string true The ID of the custom scoring metric.
versionId path string true The ID of the custom scoring metric version.

Example responses

200 Response

{
  "properties": {
    "codeFileContents": {
      "description": "Raw contents of the custom metrics Python file.",
      "type": "string"
    },
    "codeFileName": {
      "description": "Code file name as stored in the catalog.",
      "type": "string"
    },
    "metadataFileContents": {
      "description": "Raw contents of the metadata file as a utf-8 string.",
      "type": "string"
    },
    "metadataFileName": {
      "description": "Metadata file name as stored in the catalog.",
      "type": "string"
    }
  },
  "required": [
    "codeFileContents",
    "codeFileName",
    "metadataFileContents",
    "metadataFileName"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Responses

Status Meaning Description Schema
200 OK none CustomScoringMetricVersionFilesResponse

Schemas

CustomMetric

{
  "properties": {
    "description": {
      "default": "Untitled",
      "description": "Custom metric description.",
      "type": [
        "string",
        "null"
      ]
    },
    "entryPoint": {
      "description": "Custom metric function entry point in the Python code on lrs.",
      "type": "string"
    },
    "label": {
      "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
      "type": "string"
    },
    "lowerIsBetter": {
      "default": true,
      "description": "Indicates whether to maximize or minimize the metric function.",
      "type": "boolean"
    },
    "name": {
      "description": "Custom metrics function name. must match the Python code function name.",
      "type": "string"
    },
    "primaryMetric": {
      "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
      "type": "boolean"
    },
    "useWeights": {
      "default": false,
      "description": "Indicates whether this metric is using weights.",
      "type": "boolean"
    }
  },
  "required": [
    "entryPoint",
    "label",
    "name",
    "primaryMetric"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
description string,null false Custom metric description.
entryPoint string true Custom metric function entry point in the Python code on lrs.
label string true Custom metrics UI label. will appear in metrics list in UI screen.
lowerIsBetter boolean false Indicates whether to maximize or minimize the metric function.
name string true Custom metrics function name. must match the Python code function name.
primaryMetric boolean true Indicates whether this metric is used for project gridsearch hyperparameter search.
useWeights boolean false Indicates whether this metric is using weights.

CustomMetricTag

{
  "properties": {
    "name": {
      "description": "Name of the tag.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "value": {
      "description": "Value of the tag.",
      "type": "string"
    }
  },
  "required": [
    "name",
    "value"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
name string true maxLength: 255
minLength: 1
minLength: 1
Name of the tag.
value string true Value of the tag.

CustomScoringMetricCreate

{
  "properties": {
    "description": {
      "description": "Description of the custom scoring metric.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Name of the custom scoring metric.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "default": [],
      "description": "Optional tags for the custom scoring metric.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type for this metric (regression, binary, or multiclass).",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    }
  },
  "required": [
    "name",
    "targetType"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
description string,null false Description of the custom scoring metric.
name string true maxLength: 255
minLength: 1
minLength: 1
Name of the custom scoring metric.
tags [CustomMetricTag] false maxItems: 50
Optional tags for the custom scoring metric.
targetType string true Target type for this metric (regression, binary, or multiclass).

Enumerated Values

Property Value
targetType [Regression, Binary, Multiclass, regression, binary, multiclass]

CustomScoringMetricListResponse

{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metrics.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Description.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Metric id.",
            "type": "string"
          },
          "isArchived": {
            "description": "Archived flag.",
            "type": "boolean"
          },
          "latestVersionNum": {
            "description": "Latest version number.",
            "type": "integer"
          },
          "name": {
            "description": "Name.",
            "type": "string"
          },
          "organizationId": {
            "description": "Organization id.",
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "default": [],
            "description": "Tags.",
            "items": {
              "properties": {
                "name": {
                  "description": "Name of the tag.",
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                "value": {
                  "description": "Value of the tag.",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "value"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 50,
            "type": "array"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "updatedAt": {
            "description": "Last updated timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "Creator user id.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "isArchived",
          "latestVersionNum",
          "name",
          "targetType",
          "userId"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
count integer false The number of items returned on this page.
data [CustomScoringMetricResponse] true maxItems: 1000
A list of custom scoring metrics.
next string,null(uri) true The url of the next page (if null, there is no next page).
previous string,null(uri) true The url of the previous page (if null, there is no previous page).

CustomScoringMetricResponse

{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Description.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Metric id.",
      "type": "string"
    },
    "isArchived": {
      "description": "Archived flag.",
      "type": "boolean"
    },
    "latestVersionNum": {
      "description": "Latest version number.",
      "type": "integer"
    },
    "name": {
      "description": "Name.",
      "type": "string"
    },
    "organizationId": {
      "description": "Organization id.",
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "default": [],
      "description": "Tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "updatedAt": {
      "description": "Last updated timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "Creator user id.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "isArchived",
    "latestVersionNum",
    "name",
    "targetType",
    "userId"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
createdAt string,null false Creation timestamp.
description string,null false Description.
id string true Metric id.
isArchived boolean true Archived flag.
latestVersionNum integer true Latest version number.
name string true Name.
organizationId string,null false Organization id.
tags [CustomMetricTag] false maxItems: 50
Tags.
targetType string true Target type.
updatedAt string,null false Last updated timestamp.
userId string true Creator user id.

Enumerated Values

Property Value
targetType [Regression, Binary, Multiclass, regression, binary, multiclass]

CustomScoringMetricUpdate

{
  "properties": {
    "description": {
      "description": "Updated description.",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "Updated name.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "description": "Updated tags.",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the tag.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "description": "Value of the tag.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 50,
      "type": "array"
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
description string,null false Updated description.
name string false maxLength: 255
minLength: 1
minLength: 1
Updated name.
tags [CustomMetricTag] false maxItems: 50
Updated tags.

CustomScoringMetricVersionCreate

{
  "properties": {
    "description": {
      "description": "Version-level notes.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
description string,null false Version-level notes.

CustomScoringMetricVersionFilesResponse

{
  "properties": {
    "codeFileContents": {
      "description": "Raw contents of the custom metrics Python file.",
      "type": "string"
    },
    "codeFileName": {
      "description": "Code file name as stored in the catalog.",
      "type": "string"
    },
    "metadataFileContents": {
      "description": "Raw contents of the metadata file as a utf-8 string.",
      "type": "string"
    },
    "metadataFileName": {
      "description": "Metadata file name as stored in the catalog.",
      "type": "string"
    }
  },
  "required": [
    "codeFileContents",
    "codeFileName",
    "metadataFileContents",
    "metadataFileName"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
codeFileContents string true Raw contents of the custom metrics Python file.
codeFileName string true Code file name as stored in the catalog.
metadataFileContents string true Raw contents of the metadata file as a utf-8 string.
metadataFileName string true Metadata file name as stored in the catalog.

CustomScoringMetricVersionListResponse

{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "A list of custom scoring metric versions.",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Creation timestamp.",
            "type": [
              "string",
              "null"
            ]
          },
          "customScoringMetricRegistryId": {
            "description": "Parent metric id.",
            "type": "string"
          },
          "description": {
            "description": "Version notes.",
            "type": [
              "string",
              "null"
            ]
          },
          "filesCatalogId": {
            "description": "Files catalog id backing this version.",
            "type": "string"
          },
          "filesCatalogVersionId": {
            "description": "Files catalog version id.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Version id.",
            "type": "string"
          },
          "metrics": {
            "default": [],
            "description": "Parsed metric definitions.",
            "items": {
              "properties": {
                "description": {
                  "default": "Untitled",
                  "description": "Custom metric description.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "entryPoint": {
                  "description": "Custom metric function entry point in the Python code on lrs.",
                  "type": "string"
                },
                "label": {
                  "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
                  "type": "string"
                },
                "lowerIsBetter": {
                  "default": true,
                  "description": "Indicates whether to maximize or minimize the metric function.",
                  "type": "boolean"
                },
                "name": {
                  "description": "Custom metrics function name. must match the Python code function name.",
                  "type": "string"
                },
                "primaryMetric": {
                  "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
                  "type": "boolean"
                },
                "useWeights": {
                  "default": false,
                  "description": "Indicates whether this metric is using weights.",
                  "type": "boolean"
                }
              },
              "required": [
                "entryPoint",
                "label",
                "name",
                "primaryMetric"
              ],
              "type": "object",
              "x-versionadded": "v2.47"
            },
            "maxItems": 100,
            "type": "array"
          },
          "stage": {
            "description": "Lifecycle stage.",
            "enum": [
              "draft",
              "Draft",
              "DRAFT",
              "registered",
              "Registered",
              "REGISTERED",
              "archived",
              "Archived",
              "ARCHIVED"
            ],
            "type": "string"
          },
          "targetType": {
            "description": "Target type.",
            "enum": [
              "Regression",
              "Binary",
              "Multiclass",
              "regression",
              "binary",
              "multiclass"
            ],
            "type": "string"
          },
          "userId": {
            "description": "Creator user id.",
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "description": "Validation status.",
            "enum": [
              "pending",
              "Pending",
              "PENDING",
              "valid",
              "Valid",
              "VALID",
              "invalid",
              "Invalid",
              "INVALID"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "versionNum": {
            "description": "Version number.",
            "type": "integer"
          }
        },
        "required": [
          "customScoringMetricRegistryId",
          "filesCatalogId",
          "id",
          "stage",
          "targetType",
          "versionNum"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "The url of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The url of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "next",
    "previous"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
count integer false The number of items returned on this page.
data [CustomScoringMetricVersionResponse] true maxItems: 1000
A list of custom scoring metric versions.
next string,null(uri) true The url of the next page (if null, there is no next page).
previous string,null(uri) true The url of the previous page (if null, there is no previous page).

CustomScoringMetricVersionResponse

{
  "properties": {
    "createdAt": {
      "description": "Creation timestamp.",
      "type": [
        "string",
        "null"
      ]
    },
    "customScoringMetricRegistryId": {
      "description": "Parent metric id.",
      "type": "string"
    },
    "description": {
      "description": "Version notes.",
      "type": [
        "string",
        "null"
      ]
    },
    "filesCatalogId": {
      "description": "Files catalog id backing this version.",
      "type": "string"
    },
    "filesCatalogVersionId": {
      "description": "Files catalog version id.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Version id.",
      "type": "string"
    },
    "metrics": {
      "default": [],
      "description": "Parsed metric definitions.",
      "items": {
        "properties": {
          "description": {
            "default": "Untitled",
            "description": "Custom metric description.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryPoint": {
            "description": "Custom metric function entry point in the Python code on lrs.",
            "type": "string"
          },
          "label": {
            "description": "Custom metrics UI label. will appear in metrics list in UI screen.",
            "type": "string"
          },
          "lowerIsBetter": {
            "default": true,
            "description": "Indicates whether to maximize or minimize the metric function.",
            "type": "boolean"
          },
          "name": {
            "description": "Custom metrics function name. must match the Python code function name.",
            "type": "string"
          },
          "primaryMetric": {
            "description": "Indicates whether this metric is used for project gridsearch hyperparameter search.",
            "type": "boolean"
          },
          "useWeights": {
            "default": false,
            "description": "Indicates whether this metric is using weights.",
            "type": "boolean"
          }
        },
        "required": [
          "entryPoint",
          "label",
          "name",
          "primaryMetric"
        ],
        "type": "object",
        "x-versionadded": "v2.47"
      },
      "maxItems": 100,
      "type": "array"
    },
    "stage": {
      "description": "Lifecycle stage.",
      "enum": [
        "draft",
        "Draft",
        "DRAFT",
        "registered",
        "Registered",
        "REGISTERED",
        "archived",
        "Archived",
        "ARCHIVED"
      ],
      "type": "string"
    },
    "targetType": {
      "description": "Target type.",
      "enum": [
        "Regression",
        "Binary",
        "Multiclass",
        "regression",
        "binary",
        "multiclass"
      ],
      "type": "string"
    },
    "userId": {
      "description": "Creator user id.",
      "type": [
        "string",
        "null"
      ]
    },
    "validationStatus": {
      "description": "Validation status.",
      "enum": [
        "pending",
        "Pending",
        "PENDING",
        "valid",
        "Valid",
        "VALID",
        "invalid",
        "Invalid",
        "INVALID"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "versionNum": {
      "description": "Version number.",
      "type": "integer"
    }
  },
  "required": [
    "customScoringMetricRegistryId",
    "filesCatalogId",
    "id",
    "stage",
    "targetType",
    "versionNum"
  ],
  "type": "object",
  "x-versionadded": "v2.47"
}

Properties

Name Type Required Restrictions Description
createdAt string,null false Creation timestamp.
customScoringMetricRegistryId string true Parent metric id.
description string,null false Version notes.
filesCatalogId string true Files catalog id backing this version.
filesCatalogVersionId string,null false Files catalog version id.
id string true Version id.
metrics [CustomMetric] false maxItems: 100
Parsed metric definitions.
stage string true Lifecycle stage.
targetType string true Target type.
userId string,null false Creator user id.
validationStatus string,null false Validation status.
versionNum integer true Version number.

Enumerated Values

Property Value
stage [draft, Draft, DRAFT, registered, Registered, REGISTERED, archived, Archived, ARCHIVED]
targetType [Regression, Binary, Multiclass, regression, binary, multiclass]
validationStatus [pending, Pending, PENDING, valid, Valid, VALID, invalid, Invalid, INVALID]