logitorch.pipelines.qa_pipelines

Attributes

Functions

ruletaker_pipeline(model, dataset_name, ...[, ...])

Runs the RuleTaker pipeline for training a model.

Module Contents

logitorch.pipelines.qa_pipelines.ruletaker_pipeline(model: torch.nn.Module, dataset_name: str, saved_model_path: str, saved_model_name: str, batch_size: int, epochs: int, accelerator: str = 'cpu', gpus: int = 0)[source]

Runs the RuleTaker pipeline for training a model.

Args:

model (nn.Module): The model to be trained. dataset_name (str): The name of the dataset. saved_model_path (str): The path to save the trained model. saved_model_name (str): The name of the saved model file. batch_size (int): The batch size for training. epochs (int): The number of training epochs. accelerator (str, optional): The accelerator to use for training. Defaults to “cpu”. gpus (int, optional): The number of GPUs to use for training. Defaults to 0.

Raises:

ModelNotCompatibleError: If the model is not compatible with RuleTaker.

logitorch.pipelines.qa_pipelines.RULETAKER_COMPATIBLE_MODELS[source]