pyabsa.tasks.ABSAInstruction.model

Classes

T5Generator

T5Classifier

ABSAGenerator

Module Contents

class pyabsa.tasks.ABSAInstruction.model.T5Generator(checkpoint)
tokenizer
model
data_collator
device
tokenize_function_inputs(sample)

Udf to tokenize the input dataset.

train(tokenized_datasets, **kwargs)

Train the generative model.

predict(text, **kwargs)

Predict the output from the model.

get_labels(tokenized_dataset, trained_model_path=None, predictor=None, batch_size=4, sample_set='train')

Get the predictions from the trained model.

get_aspect_metrics(true_aspects, pred_aspects)
get_classic_metrics(y_true, y_pred)
class pyabsa.tasks.ABSAInstruction.model.T5Classifier(model_checkpoint)
tokenizer
model
data_collator
tokenize_function_inputs(sample)

Udf to tokenize the input dataset.

train(tokenized_datasets, **kwargs)

Train the generative model.

get_labels(tokenized_dataset, predictor=None, batch_size=4, sample_set='train')

Get the predictions from the trained model.

get_metrics(y_true, y_pred)
class pyabsa.tasks.ABSAInstruction.model.ABSAGenerator(checkpoint)

Bases: T5Generator