You can use either the Vertex AI SDK for Python or the Google Cloud console to create or delete an experiment. The SDK is a library of Python code that you can use to programmatically create and manage experiments. The console is a web-based user interface that you can use to create and manage experiments visually.
Create experiment with a TensorBoard instance
Vertex AI SDK for Python
Create an experiment and, optionally, associate a Vertex AI TensorBoard instance using
the Vertex AI SDK for Python. Add a description for the
experiment to document its purpose. See init
in the Vertex AI SDK reference documentation.
Python
experiment_name
: Provide a name for your experiment.experiment_description
: Provide a description for your experiment.experiment_tensorboard
: Optional. The Vertex TensorBoard instance to use as a backing TensorBoard for the provided experiment. If noexperiment_tensorboard
is provided, a default TB instance is created and used by this experiment. Note: If CMEK (encryption keys) need to be associated with the TensorBoard instance, thenexperiment_tensorboard
is no longer optional.project
: Your project ID. You can find these IDs in the Google Cloud console welcome page.
location
: See List of available locations Be sure to use a region that supports TensorBoard if creating a TensorBoard instance.
Google Cloud console
Use these instructions to create an experiment.
- In the Google Cloud console, go to the Experiments page.
Go to Experiments - Be sure you're in the project you want to create the experiment in.
- Click Create to open the Experiment pane. The Create experiment pane appears.
- In the Experiment name field, provide a name to uniquely identify your experiment.
- Optional. In the TensorBoard instance field, select an instance from the drop-down or provide a name for your new TensorBoard instance.
- Click Create to create your experiment.
Create an experiment without a default TensorBoard instance
Vertex AI SDK for Python
Create an experiment. Add a description for the
experiment to document its purpose. See init
in the Vertex AI SDK reference documentation.
Python
experiment_name
: Provide a name for your experiment.experiment_description
: Provide a description for your experiment.project
: Your project ID. You can find these IDs in the Google Cloud console welcome page.
location
: See List of available locations Be sure to use a region that supports TensorBoard if creating a TensorBoard instance.
Delete experiment
Deleting an experiment deletes that experiment and all experiment runs associated with the experiment. The Vertex AI TensorBoard experiment associated with the experiment is not deleted. To delete a TensorBoard experiment, see Delete outdated Vertex AI TensorBoard experiment.
Also, any pipeline runs, artifacts, and executions associated with the deleted experiment are not removed. These can be found in the Google Cloud console. For artifacts and executions, a $10/GB monthly charge is handled by the Vertex ML Metadata service.
Vertex AI SDK for Python
The following sample uses the
delete
method from the
ExperimentClass
.
Python
experiment_name
: Provide a name for your experiment.project
: Your project ID. You can find these IDs in the Google Cloud console welcome page.location
: See List of available locationsdelete_backing_tensorboard_runs
: If True will also delete the Vertex AI TensorBoard runs associated with the experiment runs under this experiment that we used to store time series metrics.
Console
Use the following instructions to delete an experiment.
- In the Google Cloud console, go to the Experiments page.
Go to Experiments - Select the checkbox associated with the experiment you want to delete. The Delete option appears.
- Click Delete.
- Alternatively, you can go to the options menu that is in the same row as the experiment and select delete.
View list of experiments in Google Cloud console
In the Google Cloud console, in the Vertex AI section, go to the Experiments page.
Check to be sure you are in the correct project.
A list of experiments for your project appears in the Experiment tracking view.
If you associated a Vertex AI TensorBoard instance with your experiment it shows up in the list as "your-experiment Backing TensorBoard Experiment".