use sorted() for repeatable generation outputs (e.g. GALLERY.md)

This commit is contained in:
Andreas Koepf 2025-01-30 23:33:43 +01:00
parent c6634fd538
commit a577f7cdf6
4 changed files with 30 additions and 24 deletions

View file

@ -51,7 +51,7 @@ class LetterCountingDataset(ProceduralDataset):
letters = {"a"} # Fallback if span has no letters
# Select random letter that appears in the span
target_letter = rng.choice(list(letters))
target_letter = rng.choice(sorted(letters))
# Count occurrences
count = sum(word.lower().count(target_letter) for word in span)