module aixplain.factories.finetune_factory
Global Variables
- prompt_validator
class FinetuneFactory
A static class for creating and managing the FineTune experience.
Attributes:
backend_url
(str): The URL for the backend.
classmethod create
create(
name: str,
dataset_list: List[Union[Dataset, str]],
model: Union[Model, str],
prompt_template: Optional[str] = None,
hyperparameters: Optional[Hyperparameters] = None,
train_percentage: Optional[float] = 100,
dev_percentage: Optional[float] = 0
) → Finetune
Create a Finetune object with the provided information.
Args:
name
(Text): Name of the Finetune.dataset_list
(List[Dataset]): List of Datasets (or dataset IDs) to be used for fine-tuning.model
(Model): Model (Model ID) to be fine-tuned.prompt_template
(Text, optional): Fine-tuning prompt_template. Should reference columns in the dataset using format <<COLUMN_NAME>>. Defaults to None.hyperparameters
(Hyperparameters, optional): Hyperparameters for fine-tuning. Defaults to None.train_percentage
(float, optional): Percentage of training samples. Defaults to 100.dev_percentage
(float, optional): Percentage of development samples. Defaults to 0.
Returns:
Finetune
: The Finetune object created with the provided information or None if there was an error.