pyabsa.tasks.RNARegression.instructor.rnar_instructor

Classes

RNARTrainingInstructor

Module Contents

class pyabsa.tasks.RNARegression.instructor.rnar_instructor.RNARTrainingInstructor(config)

Bases: pyabsa.framework.instructor_class.instructor_template.BaseTrainingInstructor

_init_misc()

Initialize miscellaneous settings specific to the subclass implementation. This method should be implemented in a subclass.

_cache_or_load_dataset()

Cache or load the dataset. This method should be implemented in a subclass.

_evaluate_acc_f1(test_dataloader)

Evaluate the accuracy and F1 score of the model. This method should be implemented in a subclass.

_load_dataset_and_prepare_dataloader()

Load the dataset and prepare the dataloader. This method should be implemented in a subclass.

reload_model(ckpt='./init_state_dict.bin')
_prepare_dataloader()

Prepares the data loaders for training, validation, and testing.

_train_and_evaluate(criterion)

Train and evaluate the model. This method should be implemented in a subclass.

_k_fold_train_and_evaluate(criterion)

Train and evaluate the model using k-fold cross validation. This method should be implemented in a subclass.

_evaluate_r2(test_dataloader, criterion)
run()