lmflow.models.text_regression_model#

A model maps “text_only” data to float.

Classes#

TextRegressionModel

Initializes a TextRegressionModel instance.

Module Contents#

class lmflow.models.text_regression_model.TextRegressionModel(model_args, *args, **kwargs)[source]#

Bases: lmflow.models.regression_model.RegressionModel

Initializes a TextRegressionModel instance.

Parameters:
model_args

Model arguments such as model name, path, revision, etc.

argsOptional.

Positional arguments.

kwargsOptional.

Keyword arguments.

inference_func = None[source]#
register_inference_function(inference_func)[source]#

Registers a regression function.

inference(inputs: lmflow.datasets.dataset.Dataset)[source]#

Gets regression results of a given dataset.

Inputs:

Dataset object, only accept type “text_only”.