EventStream.transformer.fine_tuning_model module¶
A model for fine-tuning on classification tasks.
- class EventStream.transformer.fine_tuning_model.ESTForStreamClassification(config: StructuredTransformerConfig)[source]¶
Bases:
StructuredTransformerPreTrainedModelA model for fine-tuning on classification tasks.
- Parameters:¶
- config: StructuredTransformerConfig¶
The model configuration class to use. This must contain the relevant fine-tuning task information (e.g.,
num_labels,finetuning_task,pooling_method, andid2label).
- forward(batch: PytorchBatch, **kwargs) StreamClassificationModelOutput[source]¶
Runs the forward pass through the fine-tuning label prediction.
- Parameters:¶
- batch: PytorchBatch¶
The batch of data to model.
- Returns:¶
A
StreamClassificationModelOutputobject capturing loss, predictions, and labels for the fine-tuning task in question.