Skip to main content

Dataset

Object-centric interface for Galileo datasets. This class provides an intuitive way to work with Galileo datasets, encapsulating dataset management operations and providing seamless integration with dataset content management. Examples

add_rows

Add rows to this dataset (active mutation). This method performs an API call and atomically updates the state. Arguments
  • rows (list[dict[str, Any]]): The rows to add to the dataset.

create

Persist this dataset to the API. Examples

delete

Delete this dataset. Examples

extend

Extend this dataset with synthetically generated data. Arguments
  • prompt (Optional[str]): A description of the assistant’s role.
  • instructions (Optional[str]): Instructions for the assistant.
  • examples (Optional[list[str]]): Examples of user prompts.
  • count (int): The number of synthetic examples to generate.
  • data_types (Optional[list[str]]): The types of data to generate.
  • prompt_settings (Optional[dict[str, Any]]): Settings for the prompt generation.

generate

Generate synthetic dataset rows. Arguments
  • prompt (Optional[str]): A description of the assistant’s role.
  • instructions (Optional[str]): Instructions for the assistant.
  • examples (Optional[list[str]]): Examples of user prompts.
  • count (int): The number of synthetic examples to generate.
  • data_types (Optional[list[str]]): The types of data to generate.
  • prompt_settings (Optional[dict[str, Any]]): Settings for the prompt generation.

get

Get an existing dataset by ID or name. Arguments
  • id (Optional[str]): The dataset ID.
  • name (Optional[str]): The dataset name.

get_content

Get the content of this dataset. Examples

get_version_content

Get the content of a specific version of this dataset. Arguments
  • index (int): The 1-based version index to retrieve. Must be >= 1.

get_versions

Get a list of versions for this dataset. Examples

list

List all available datasets, optionally filtered by project. Arguments
  • limit (Union[Unset, int]): Maximum number of datasets to return.
  • project_id (Optional[str]): Filter datasets used in this project by ID.
  • project_name (Optional[str]): Filter datasets used in this project by name.

refresh

Refresh this dataset’s state from the API. Updates all attributes with the latest values from the remote API and sets the state to SYNCED. Examples

save

Save changes to this dataset. Persists any local changes (name) to the remote API. If the dataset is LOCAL_ONLY, delegates to create(). If SYNCED, returns immediately as a no-op. Raises ValueError for DELETED or FAILED_SYNC states. Examples