diff --git a/turbo_alignment/metrics/registry.py b/turbo_alignment/metrics/registry.py index 07b8f04..f334816 100755 --- a/turbo_alignment/metrics/registry.py +++ b/turbo_alignment/metrics/registry.py @@ -29,7 +29,7 @@ class MetricSettings(ExtraFieldsNotAllowedBaseModel): class DistinctnessSettings(MetricSettings): ngram: int = 5 - @field_validator('ngram', mode="before") + @field_validator('ngram', mode='before') def check_ngram(cls, value: int): if value <= 0: raise ValueError('ngram should be greater that 0')