Reference for the Dataset class in the Future AGI Python SDK.
Dataset
ClassDataset
class is the primary client for managing datasets in the Future AGI SDK. It supports both class-level (static) and instance-level operations for creating, downloading, modifying, and deleting datasets, as well as adding columns, rows, prompts, and evaluations.
dataset_config
(Optional[DatasetConfig]): The configuration for the dataset. If provided and has no ID, the config will be fetched by name.fi_api_key
(Optional[str]): API key for authentication.fi_secret_key
(Optional[str]): Secret key for authentication.fi_base_url
(Optional[str]): Base URL for the API.**kwargs
: Additional keyword arguments for advanced configuration.create
Dataset
instancedownload
str
)Dataset
instancedelete
get_config
DatasetConfig
instanceadd_columns
columns
(List[Union[Column, dict]]): A list of Column
objects or dictionaries.Dataset
instanceadd_rows
rows
(List[Union[Row, dict]]): A list of Row
objects or dictionaries.Dataset
instanceget_column_id
column_name
(str): The name of the column.str
)add_run_prompt
name
(str): The name of the run prompt column.model
(str): The model to use for the run prompt column.messages
(List[Dict[str, str]]): The messages to use for the run prompt column.output_format
(str): The output format to use for the run prompt column.concurrency
(int): The concurrency to use for the run prompt column.max_tokens
(int): The max tokens to use for the run prompt column.temperature
(float): The temperature to use for the run prompt column.presence_penalty
(float): The presence penalty to use for the run prompt column.frequency_penalty
(float): The frequency penalty to use for the run prompt column.top_p
(float): The top p to use for the run prompt column.tools
(Optional[List[Dict]]): The tools to use for the run prompt column.tool_choice
(Optional[Any]): The tool choice to use for the run prompt column.response_format
(Optional[Dict]): The response format to use for the run prompt column.Dataset
instanceadd_evaluation
name
(str): The name of the evaluation.eval_template
(str): The evaluation template to use for the evaluation.required_keys_to_column_names
(Dict[str, str]): The required keys to column names to use for the evaluation.save_as_template
(bool): Whether to save the evaluation as a template.run
(bool): Whether to run the evaluation.reason_column
(bool): Whether to add a reason column to the evaluation.config
(Optional[Dict[str, Any]]): The configuration to use for the evaluation.Dataset
instanceget_eval_stats
add_optimization
optimization_name
(str): The name of the optimization task.prompt_column_name
(str): The name of the prompt column to optimize.optimize_type
(str): The type of optimization to perform.model_config
(Optional[Dict[str, Any]]): The model configuration to use for the optimization.Dataset
instancecreate_dataset
dataset_config
(DatasetConfig): The configuration for the dataset.source
(Optional[Union[str, HuggingfaceDatasetConfig]]): The source to use for the dataset.Dataset
instancedownload_dataset
dataset_name
(str): The name of the dataset.file_path
(Optional[str]): The file path to save the dataset to.load_to_pandas
(bool): Whether to load the dataset to a pandas DataFrame.str
)delete_dataset
dataset_name
(str): The name of the dataset.get_dataset_config
dataset_name
(str): The name of the dataset.excluded_datasets
(Optional[List[str]]): The datasets to exclude from the configuration.Dataset
instanceadd_dataset_columns
dataset_name
(str): The name of the dataset.columns
(List[Union[Column, dict]]): The columns to add to the dataset.Dataset
instanceadd_dataset_rows
dataset_name
(str): The name of the dataset.rows
(List[Union[Row, dict]]): The rows to add to the dataset.Dataset
instance