Skip to main content

experiment_runs

Operations on a experiment_runs resource.

Overview

Nameexperiment_runs
TypeResource
Iddatabricks_workspace.machinelearning.experiment_runs

Fields

NameDatatype
dataobject
infoobject
inputsobject

Methods

NameAccessible byRequired ParamsDescription
getrunSELECTrun_id, deployment_nameGets the metadata, metrics, params, and tags for a run. In the case where multiple metrics with the same key are logged for a run, return only the value with the latest timestamp.
searchrunsSELECTdeployment_nameSearches for runs that satisfy expressions.
createrunINSERTdeployment_nameCreates a new run within an experiment. A run is usually a single execution of a machine learning or data ETL pipeline. MLflow uses runs to track the
deleterunDELETEdeployment_nameMarks a run for deletion.
deleterunsDELETEdeployment_nameBulk delete runs in an experiment that were created prior to or at the specified timestamp. Deletes at most max_runs per request. To call this API from a Databricks Notebook in Python, you can use the client code snippet on
updaterunUPDATEdeployment_nameUpdates run metadata.
logbatchEXECdeployment_nameLogs a batch of metrics, params, and tags for a run. If any data failed to be persisted, the server will respond with an error (non-200 status code).
loginputsEXECdeployment_nameExperimental: This API may change or be removed in a future release without warning.
logmetricEXECdeployment_nameLogs a metric for a run. A metric is a key-value pair (string key, float value) with an associated timestamp. Examples include the various metrics that represent ML model accuracy. A metric can be logged multiple times.
logmodelEXECdeployment_nameExperimental: This API may change or be removed in a future release without warning.
logparamEXECdeployment_nameLogs a param used for a run. A param is a key-value pair (string key, string value). Examples include hyperparameters used for ML model training and constant dates and values used in an ETL pipeline. A param can be logged only once for a run.
restorerunEXECdeployment_nameRestores a deleted run.
restorerunsEXECdeployment_nameBulk restore runs in an experiment that were deleted no earlier than the specified timestamp. Restores at most max_runs per request. To call this API from a Databricks Notebook in Python, you can use the client code snippet on

SELECT examples

SELECT
data,
info,
inputs
FROM databricks_workspace.machinelearning.experiment_runs
WHERE deployment_name = '{{ deployment_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new experiment_runs resource.

/*+ create */
INSERT INTO databricks_workspace.machinelearning.experiment_runs (
deployment_name,
data__experiment_id,
data__user_id,
data__start_time,
data__tags
)
SELECT
'{{ deployment_name }}',
'{{ experiment_id }}',
'{{ user_id }}',
'{{ start_time }}',
'{{ tags }}'
;

UPDATE example

Updates a experiment_runs resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.machinelearning.experiment_runs
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE deployment_name = '{{ deployment_name }}';

DELETE example

Deletes a experiment_runs resource.

/*+ delete */
DELETE FROM databricks_workspace.machinelearning.experiment_runs
WHERE deployment_name = '{{ deployment_name }}';