autointent.modules.abc.ScoringModule#

class autointent.modules.abc.ScoringModule#

Bases: autointent.modules.abc.Module, abc.ABC

Abstract base class for scoring modules.

Scoring modules predict scores for utterances and evaluate their performance using a scoring metric.

score(context, split, metric_fn)#

Evaluate the scorer on a test set and compute the specified metric.

Parameters:
Returns:

Computed metric value for the test set.

Return type:

float

get_assets()#

Retrieve assets generated during scoring.

Returns:

ScorerArtifact containing test scores and out-of-scope (OOS) scores.

Return type:

autointent.context.optimization_info.ScorerArtifact

abstract predict(utterances)#

Predict scores for a list of utterances.

Parameters:

utterances (list[str]) – List of utterances to score.

Returns:

Array of predicted scores.

Return type:

numpy.typing.NDArray[Any]