pyabsa.tasks.ABSAInstruction.model

Module Contents

Classes

T5Generator

T5Classifier

ABSAGenerator

class pyabsa.tasks.ABSAInstruction.model.T5Generator(checkpoint)[source]
tokenize_function_inputs(sample)[source]

Udf to tokenize the input dataset.

train(tokenized_datasets, **kwargs)[source]

Train the generative model.

predict(text, **kwargs)[source]

Predict the output from the model.

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

Get the predictions from the trained model.

get_aspect_metrics(true_aspects, pred_aspects)[source]
get_classic_metrics(y_true, y_pred)[source]
class pyabsa.tasks.ABSAInstruction.model.T5Classifier(model_checkpoint)[source]
tokenize_function_inputs(sample)[source]

Udf to tokenize the input dataset.

train(tokenized_datasets, **kwargs)[source]

Train the generative model.

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

Get the predictions from the trained model.

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

Bases: T5Generator