experiment_runs
Operations on a experiment_runs
resource.
Overview
Name | experiment_runs |
Type | Resource |
Id | databricks_workspace.machinelearning.experiment_runs |
Fields
Name | Datatype |
---|---|
data | object |
info | object |
inputs | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
getrun | SELECT | run_id, deployment_name | Gets 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. |
searchruns | SELECT | deployment_name | Searches for runs that satisfy expressions. |
createrun | INSERT | deployment_name | Creates 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 |
deleterun | DELETE | deployment_name | Marks a run for deletion. |
deleteruns | DELETE | deployment_name | Bulk 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 |
updaterun | UPDATE | deployment_name | Updates run metadata. |
logbatch | EXEC | deployment_name | Logs 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). |
loginputs | EXEC | deployment_name | Experimental: This API may change or be removed in a future release without warning. |
logmetric | EXEC | deployment_name | Logs 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. |
logmodel | EXEC | deployment_name | Experimental: This API may change or be removed in a future release without warning. |
logparam | EXEC | deployment_name | Logs 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. |
restorerun | EXEC | deployment_name | Restores a deleted run. |
restoreruns | EXEC | deployment_name | Bulk 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
- experiment_runs (searchruns)
- experiment_runs (getrun)
SELECT
data,
info,
inputs
FROM databricks_workspace.machinelearning.experiment_runs
WHERE deployment_name = '{{ deployment_name }}';
SELECT
data,
info,
inputs
FROM databricks_workspace.machinelearning.experiment_runs
WHERE run_id = '{{ run_id }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new experiment_runs
resource.
- experiment_runs
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: experiment_id
value: string
- name: user_id
value: string
- name: start_time
value: 0
- name: tags
value:
- key: string
value: string
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.
- deleterun
- deleteruns
/*+ delete */
DELETE FROM databricks_workspace.machinelearning.experiment_runs
WHERE deployment_name = '{{ deployment_name }}';
/*+ delete */
DELETE FROM databricks_workspace.machinelearning.experiment_runs
WHERE deployment_name = '{{ deployment_name }}';