logitorch.data_collators.ruletaker_collator
#
Module Contents#
Classes#
A collator class for RuleTaker model. |
|
A collator class for RuleTaker with ProofWriter model. |
- class logitorch.data_collators.ruletaker_collator.RuleTakerCollator[source]#
A collator class for RuleTaker model.
This collator is used to preprocess and collate data for RuleTaker model training or inference.
- __call__(batch) Tuple[Dict[str, torch.Tensor], torch.Tensor] [source]#
Preprocesses and collates the batch data.
- Args:
- batch: A list of tuples containing the context, question, label, and additional information.
- Returns:
- Tuple[Dict[str, torch.Tensor], torch.Tensor]: A tuple containing the batch inputs and labels.
- class logitorch.data_collators.ruletaker_collator.RuleTakerProofWriterCollator[source]#
A collator class for RuleTaker with ProofWriter model.
This collator is used to preprocess and collate data for RuleTaker with ProofWriter model training or inference.
- __call__(batch) Tuple[Dict[str, torch.Tensor], torch.Tensor] [source]#
Preprocesses and collates the batch data.
- Args:
- batch: A list of tuples containing the context, question, label, and additional information.
- Returns:
- Tuple[Dict[str, torch.Tensor], torch.Tensor]: A tuple containing the batch inputs and labels.