pyabsa.tasks._Archive.RNAClassification.prediction.rna_classifier
Module Contents
Classes
- class pyabsa.tasks._Archive.RNAClassification.prediction.rna_classifier.RNAClassifier(checkpoint=None, cal_perplexity=False, **kwargs)[source]
Bases:
pyabsa.framework.prediction_class.predictor_template.InferenceModel
- batch_predict(target_file=None, print_result=True, save_result=False, ignore_error=True, **kwargs)[source]
Runs inference on a batch of data.
- Parameters:
target_file (-) – str or Path. Path to the target file.
print_result (-) – bool. Whether to print the result.
save_result (-) – bool. Whether to save the result.
ignore_error (-) – bool. Whether to ignore errors.
kwargs (-) – dict. Additional keyword arguments.
- Returns:
list. List of predictions.
- Return type:
result
- predict(text: str = None, print_result=True, ignore_error=True, **kwargs)[source]
Runs inference on a single sample.
- Parameters:
text (-) – str. The text to predict.
print_result (-) – bool. Whether to print the result.
ignore_error (-) – bool. Whether to ignore errors.
kwargs (-) – dict. Additional keyword arguments.
- Returns:
list. List of predictions.
- Return type:
result
- class pyabsa.tasks._Archive.RNAClassification.prediction.rna_classifier.Predictor(checkpoint=None, cal_perplexity=False, **kwargs)[source]
Bases:
RNAClassifier