From b27ceb7d9a32bfb2a862fed40c0a68ce84d2493d Mon Sep 17 00:00:00 2001 From: Alexey Gorbatovski Date: Fri, 18 Oct 2024 20:22:41 +0300 Subject: [PATCH] Update turbo_alignment/metrics/registry.py Co-authored-by: Aleksey Malakhov <131314005+alekseymalakhov11@users.noreply.github.com> --- turbo_alignment/metrics/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')