add metadata for caesar cipher, graph coloring, decimal arithmetic (#304)

* add metadata for caesar cipher, graph coloring, decimal arithmetic

* delete comma

* clean up variables
This commit is contained in:
vncntt 2025-03-09 10:08:56 -07:00 committed by GitHub
parent fc908d4cf4
commit af6120c095
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 4 deletions

View file

@ -67,6 +67,7 @@ class CaesarCipherDataset(ProceduralDataset):
# Select random sentence and rotation
sentence = rng.choice(self.valid_sentences)
num_words = len(sentence.split())
rotation = rng.randint(self.config.min_rotation, self.config.max_rotation)
# Generate cipher text
@ -79,6 +80,10 @@ class CaesarCipherDataset(ProceduralDataset):
"rotation": rotation,
"cipher_text": cipher_text,
"clear_text": sentence,
"difficulty": {
"rotation": rotation,
"words": num_words,
},
},
}