Skip to content

Commit

Permalink
Update turbo_alignment/metrics/registry.py
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksey Malakhov <[email protected]>
  • Loading branch information
Myashka and alekseymalakhov11 authored Oct 18, 2024
1 parent 28a208d commit 9248385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion turbo_alignment/metrics/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DistinctnessSettings(MetricSettings):
ngram: int = 5

@field_validator('ngram', mode='before')
def check_ngram(cls, value: int):
def check_ngram(cls, value: int) -> int:
if value <= 0:
raise ValueError('ngram should be greater that 0')
return value
Expand Down

0 comments on commit 9248385

Please sign in to comment.