Skip to main content

experiment_runs

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

Overview

Nameexperiment_runs
TypeResource
Iddatabricks_workspace.ml.experiment_runs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
runobjectA single run.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectrun_id, deployment_namerun_uuidGets the metadata, metrics, params, and tags for a run. In the case where multiple metrics with the
createinsertdeployment_nameCreates a new run within an experiment. A run is usually a single execution of a machine learning or
deleteexecdeployment_name, run_idMarks a run for deletion.
delete_bulkexecdeployment_name, experiment_id, max_timestamp_millisBulk delete runs in an experiment that were created prior to or at the specified timestamp. Deletes at
delete_tagexecdeployment_name, run_id, keyDeletes a tag on a run. Tags are run metadata that can be updated during a run and after a run
log_batchexecdeployment_nameLogs a batch of metrics, params, and tags for a run. If any data failed to be persisted, the server
log_inputsexecdeployment_name, run_idLogs inputs, such as datasets and models, to an MLflow Run.
log_metricexecdeployment_name, key, value, timestampLog a metric for a run. A metric is a key-value pair (string key, float value) with an associated
log_modelexecdeployment_nameNote: the Create a logged model API replaces this
log_outputsexecdeployment_name, run_idLogs outputs, such as models, from an MLflow Run.
log_paramexecdeployment_name, key, valueLogs a param used for a run. A param is a key-value pair (string key, string value). Examples include
restoreexecdeployment_name, run_idRestores a deleted run. This also restores associated metadata, runs, metrics, params, and tags.
restore_bulkexecdeployment_name, experiment_id, min_timestamp_millisBulk restore runs in an experiment that were deleted no earlier than the specified timestamp. Restores
searchexecdeployment_nameSearches for runs that satisfy expressions.
set_tagexecdeployment_name, key, valueSets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.
updateexecdeployment_nameUpdates run metadata.

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)
run_idstringID of the run to fetch. Must be provided.
run_uuidstring[Deprecated, use run_id instead] ID of the run to fetch. This field will be removed in a future MLflow version.

SELECT examples

Gets the metadata, metrics, params, and tags for a run. In the case where multiple metrics with the

SELECT
run
FROM databricks_workspace.ml.experiment_runs
WHERE run_id = '{{ run_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND run_uuid = '{{ run_uuid }}'
;

INSERT examples

Creates a new run within an experiment. A run is usually a single execution of a machine learning or

INSERT INTO databricks_workspace.ml.experiment_runs (
experiment_id,
run_name,
start_time,
tags,
user_id,
deployment_name
)
SELECT
'{{ experiment_id }}',
'{{ run_name }}',
{{ start_time }},
'{{ tags }}',
'{{ user_id }}',
'{{ deployment_name }}'
RETURNING
run
;

Lifecycle Methods

Marks a run for deletion.

EXEC databricks_workspace.ml.experiment_runs.delete 
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"run_id": "{{ run_id }}"
}'
;