Skip to main content

experiments

Operations on a experiments resource.

Overview

Nameexperiments
TypeResource
Iddatabricks_workspace.machinelearning.experiments

Fields

NameDatatype
namestring
artifact_locationstring
creation_timeinteger
experiment_idstring
last_update_timeinteger
lifecycle_stagestring
tagsarray

Methods

NameAccessible byRequired ParamsDescription
getbynameSELECTexperiment_name, deployment_nameGets metadata for an experiment.
getexperimentSELECTexperiment_id, deployment_nameGets metadata for an experiment. This method works on deleted experiments.
listexperimentsSELECTdeployment_nameGets a list of all experiments.
searchexperimentsSELECTdeployment_nameSearches for experiments that satisfy specified search criteria.
createexperimentINSERTdeployment_nameCreates 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.
deleteexperimentDELETEdeployment_nameMarks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the experiment uses FileStore, artifacts associated with experiment are also deleted.
updateexperimentUPDATEdeployment_nameUpdates experiment metadata.
restoreexperimentEXECdeployment_nameRestore 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.

SELECT examples

SELECT
name,
artifact_location,
creation_time,
experiment_id,
last_update_time,
lifecycle_stage,
tags
FROM databricks_workspace.machinelearning.experiments
WHERE deployment_name = '{{ deployment_name }}';

INSERT example

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

/*+ create */
INSERT INTO databricks_workspace.machinelearning.experiments (
deployment_name,
data__name,
data__artifact_location,
data__tags
)
SELECT
'{{ deployment_name }}',
'{{ name }}',
'{{ artifact_location }}',
'{{ tags }}'
;

UPDATE example

Updates a experiments resource.

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

DELETE example

Deletes a experiments resource.

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