prompting.validators.penalty.content_match#

Module Contents#

Classes#

ContentMatchPenaltyModel

Helper class that provides a standard way to create an ABC using

class prompting.validators.penalty.content_match.ContentMatchPenaltyModel(max_penalty)#

Bases: prompting.validators.penalty.penalty.BasePenaltyModel

Helper class that provides a standard way to create an ABC using inheritance.

Parameters:

max_penalty (float) –

property name: str#
Return type:

str

calculate_penalties(task, completions)#
Parameters:
Return type:

torch.FloatTensor