Skip to main content

experiment_run_metrics

Creates, updates, deletes, gets or lists an experiment_run_metrics resource.

Overview

Nameexperiment_run_metrics
TypeResource
Iddatabricks_workspace.ml.experiment_run_metrics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
model_idstringThe ID of the logged model or registered model version associated with the metric, if applicable.
run_idstringThe ID of the run containing the metric.
dataset_namestringThe name of the dataset associated with the metric. E.g. “my.uc.table@2” “nyc-taxi-dataset”, “fantastic-elk-3”
dataset_digeststringThe dataset digest of the dataset associated with the metric, e.g. an md5 hash of the dataset that uniquely identifies it within datasets of the same name.
keystringThe key identifying the metric.
stepintegerThe step at which the metric was logged.
timestampintegerThe timestamp at which the metric was recorded.
valuenumberThe value of the metric.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectmetric_key, deployment_namemax_results, page_token, run_id, run_uuidGets a list of all values for the specified metric for a given run.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
metric_keystringName of the metric.
max_resultsintegerMaximum number of Metric records to return per paginated request. Default is set to 25,000. If set higher than 25,000, a request Exception will be raised.
page_tokenstringToken indicating the page of metric histories to fetch.
run_idstringID of the run from which to fetch metric values. Must be provided.
run_uuidstring[Deprecated, use run_id instead] ID of the run from which to fetch metric values. This field will be removed in a future MLflow version.

SELECT examples

Gets a list of all values for the specified metric for a given run.

SELECT
model_id,
run_id,
dataset_name,
dataset_digest,
key,
step,
timestamp,
value
FROM databricks_workspace.ml.experiment_run_metrics
WHERE metric_key = '{{ metric_key }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND max_results = '{{ max_results }}'
AND page_token = '{{ page_token }}'
AND run_id = '{{ run_id }}'
AND run_uuid = '{{ run_uuid }}'
;