> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# experiment_tags

## Module

Experiment Tags functionality for managing tags on experiments.

## ExperimentTagsAPIException

Exception raised when experiment tags operations fail.

## ExperimentTag

Wrapper class for experiment tags that provides additional functionality.

## ExperimentTags

### delete\_experiment\_tag

```python theme={null}
def delete_experiment_tag(self,
                          project_id: str,
                          experiment_id: str,
                          tag_id: str) -> dict[str, str]
```

Delete a specific tag from an experiment.

**Arguments**

* `project_id`: The project ID
* `experiment_id`: The experiment ID
* `tag_id`: The tag ID to delete

**Raises**

* `ExperimentTagsAPIException`: If the API call fails
* `ValueError`: If the experiment or tag is not found

**Returns**

* `dict[str, str]`: Success message

### get\_experiment\_tags

```python theme={null}
def get_experiment_tags(self,
                        project_id: str,
                        experiment_id: str) -> list[ExperimentTag]
```

Get all tags for a specific experiment.

## Parameters

project\_id
The project ID
experiment\_id
The experiment ID

## Returns

list\[ExperimentTag]
List of tags associated with the experiment

## Raises

ExperimentTagsAPIException
If the API call fails
ValueError
If the experiment is not found

### upsert\_experiment\_tag

```python theme={null}
def upsert_experiment_tag(self,
                          project_id: str,
                          experiment_id: str,
                          key: str,
                          value: str,
                          tag_type: str='generic') -> ExperimentTag
```

Upsert a tag for a specific experiment.

**Arguments**

* `project_id`: The project ID
* `experiment_id`: The experiment ID
* `key`: The tag key
* `value`: The tag value
* `tag_type`: The type of tag (default: "generic")

**Raises**

* `ExperimentTagsAPIException`: If the API call fails
* `ValueError`: If the experiment is not found

**Returns**

* `ExperimentTag`: The created or updated tag

## delete\_experiment\_tag

```python theme={null}
def delete_experiment_tag(project_id: str,
                          experiment_id: str,
                          tag_id: str) -> dict[str, str]
```

Delete a specific tag from an experiment.

**Arguments**

* `project_id`: The project ID
* `experiment_id`: The experiment ID
* `tag_id`: The tag ID to delete

**Raises**

* `ExperimentTagsAPIException`: If the API call fails
* `ValueError`: If the experiment or tag is not found

**Returns**

* `dict[str, str]`: Success message

## get\_experiment\_tags

```python theme={null}
def get_experiment_tags(project_id: str, experiment_id: str) -> list[ExperimentTag]
```

Get all tags for a specific experiment.

**Arguments**

* `project_id`: The project ID
* `experiment_id`: The experiment ID

**Raises**

* `ExperimentTagsAPIException`: If the API call fails
* `ValueError`: If the experiment is not found

**Returns**

* `list[ExperimentTag]`: List of tags associated with the experiment

## upsert\_experiment\_tag

```python theme={null}
def upsert_experiment_tag(project_id: str,
                          experiment_id: str,
                          key: str,
                          value: str,
                          tag_type: str='generic') -> ExperimentTag
```

Upsert (create or update) a tag for a specific experiment.

**Arguments**

* `project_id`: The project ID
* `experiment_id`: The experiment ID
* `key`: The tag key
* `value`: The tag value
* `tag_type`: The type of tag (default: "generic")

**Raises**

* `ExperimentTagsAPIException`: If the API call fails
* `ValueError`: If the experiment is not found

**Returns**

* `ExperimentTag`: The created or updated tag
