Skip to main content

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

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

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

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

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

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

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