experiments
Creates, updates, deletes, gets or lists an experiments
resource.
Overview
Name | experiments |
Type | Resource |
Id | databricks_workspace.machinelearning.experiments |
Fields
The following fields are returned by SELECT
queries:
- searchexperiments
- listexperiments
- getexperiment
- getbyname
Name | Datatype | Description |
---|---|---|
name | string | |
experiment_id | string | |
artifact_location | string | |
creation_time | integer | |
last_update_time | integer | |
lifecycle_stage | string | |
tags | array |
Name | Datatype | Description |
---|---|---|
name | string | |
experiment_id | string | |
artifact_location | string | |
creation_time | integer | |
last_update_time | integer | |
lifecycle_stage | string | |
tags | array |
Name | Datatype | Description |
---|---|---|
name | string | |
experiment_id | string | |
artifact_location | string | |
creation_time | integer | |
last_update_time | integer | |
lifecycle_stage | string | |
tags | array |
Name | Datatype | Description |
---|---|---|
name | string | |
experiment_id | string | |
artifact_location | string | |
creation_time | integer | |
last_update_time | integer | |
lifecycle_stage | string | |
tags | array |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
searchexperiments | select | deployment_name | Searches for experiments that satisfy specified search criteria. | |
listexperiments | select | deployment_name | Gets a list of all experiments. | |
getexperiment | select | deployment_name | Gets metadata for an experiment. This method works on deleted experiments. | |
getbyname | select | deployment_name | Gets metadata for an experiment. | |
createexperiment | insert | deployment_name | Creates an experiment with a name. Returns the ID of the newly created experiment. Validates that another experiment with the same name does not already exist and fails if another experiment with the same name already exists. | |
updateexperiment | update | deployment_name | Updates experiment metadata. | |
deleteexperiment | delete | deployment_name | Marks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the experiment uses FileStore, artifacts associated with experiment are also deleted. | |
restoreexperiment | exec | deployment_name | Restore an experiment marked for deletion. This also restores associated metadata, runs, metrics, params, and tags. If experiment uses FileStore, underlying artifacts associated with experiment are also restored. |
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.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- searchexperiments
- listexperiments
- getexperiment
- getbyname
Searches for experiments that satisfy specified search criteria.
SELECT
name,
experiment_id,
artifact_location,
creation_time,
last_update_time,
lifecycle_stage,
tags
FROM databricks_workspace.machinelearning.experiments
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets a list of all experiments.
SELECT
name,
experiment_id,
artifact_location,
creation_time,
last_update_time,
lifecycle_stage,
tags
FROM databricks_workspace.machinelearning.experiments
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets metadata for an experiment. This method works on deleted experiments.
SELECT
name,
experiment_id,
artifact_location,
creation_time,
last_update_time,
lifecycle_stage,
tags
FROM databricks_workspace.machinelearning.experiments
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets metadata for an experiment.
SELECT
name,
experiment_id,
artifact_location,
creation_time,
last_update_time,
lifecycle_stage,
tags
FROM databricks_workspace.machinelearning.experiments
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- createexperiment
- Manifest
Creates an experiment with a name. Returns the ID of the newly created experiment. Validates that another experiment with the same name does not already exist and fails if another experiment with the same name already exists.
INSERT INTO databricks_workspace.machinelearning.experiments (
data__name,
data__artifact_location,
data__tags,
deployment_name
)
SELECT
'{{ name }}',
'{{ artifact_location }}',
'{{ tags }}',
'{{ deployment_name }}'
RETURNING
experiment_id
;
# Description fields are for documentation purposes
- name: experiments
props:
- name: deployment_name
value: string
description: Required parameter for the experiments resource.
- name: name
value: required
- name: artifact_location
value: string
- name: tags
value: Array of object
UPDATE
examples
- updateexperiment
Updates experiment metadata.
UPDATE databricks_workspace.machinelearning.experiments
SET
data__experiment_id = '{{ experiment_id }}',
data__new_name = '{{ new_name }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;
DELETE
examples
- deleteexperiment
Marks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the experiment uses FileStore, artifacts associated with experiment are also deleted.
DELETE FROM databricks_workspace.machinelearning.experiments
WHERE deployment_name = '{{ deployment_name }}' --required;
Lifecycle Methods
- restoreexperiment
Restore an experiment marked for deletion. This also restores associated metadata, runs, metrics, params, and tags. If experiment uses FileStore, underlying artifacts associated with experiment are also restored.
EXEC databricks_workspace.machinelearning.experiments.restoreexperiment
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"experiment_id": "{{ experiment_id }}"
}';