Skip to main content

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.

load_dataset

def load_dataset(dataset: Union['Dataset', list[dict[str, Any] | str], str, None],
                 dataset_id: str | None,
                 dataset_name: str | None) -> Optional['Dataset']
Load dataset based on provided parameters. Arguments
  • dataset: Dataset object, list of records, or dataset name
  • dataset_id: ID of the dataset
  • dataset_name: Name of the dataset
Raises
  • ValueError: If no dataset information is provided or dataset doesn’t exist
Returns
  • Dataset object or None:

load_dataset_and_records

def load_dataset_and_records(dataset: Union['Dataset', list[dict[str, Any] | str], str, None],
                             dataset_id: str | None,
                             dataset_name: str | None) -> tuple[Optional['Dataset'], list[DatasetRecord]]
Load dataset and records based on provided parameters. Arguments
  • dataset: Dataset object, list of records, or dataset name
  • dataset_id: ID of the dataset
  • dataset_name: Name of the dataset
Raises
  • ValueError: If no dataset information is provided or dataset doesn’t exist
Returns
  • Tuple containing (Dataset object or None, records list):

normalize_dataset_rows

def normalize_dataset_rows(rows: list[dict[str, Any]]) -> list[dict[str, Any]]
Normalize dataset rows by renaming ground_truth to output. Allows callers to use either field name. output takes precedence when both are present. The caller’s original dicts are never mutated.

remap_output_to_ground_truth

def remap_output_to_ground_truth(content: DatasetContent) -> DatasetContent
Renames ‘output’ back to ‘ground_truth’ in DatasetContent returned by the API. The API stores ground_truth as ‘output’ internally. This is the inverse of normalize_dataset_rows, applied when reading content back out.