mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-05-02 17:45:58 +00:00
make task entries json serializable (#443)
* make sympy-based task entries json serializable * remove datetime objs from time_intervals metadata * make adv geometry json serializable * make futoshiki metadata json serializable * fixes * futoshiki tweaks * fix adv geometry * deal with fractions in str representations * fix * restore start_time, end_time as str
This commit is contained in:
parent
6614338ecc
commit
c0e98f93b4
11 changed files with 36 additions and 37 deletions
|
|
@ -79,6 +79,8 @@ class FutoshikiDataset(ProceduralDataset):
|
|||
f"Remember, in Futoshiki each row and column must contain each number from 1 to {board_size} exactly once."
|
||||
)
|
||||
|
||||
constraints_meta = [(r1, c1, r2, c2, sign) for ((r1, c1), (r2, c2)), sign in constraints.items()]
|
||||
|
||||
return {
|
||||
"question": question,
|
||||
"answer": solution_str,
|
||||
|
|
@ -86,7 +88,7 @@ class FutoshikiDataset(ProceduralDataset):
|
|||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"puzzle": puzzle,
|
||||
"constraints": constraints,
|
||||
"constraints": constraints_meta,
|
||||
"solution": solution,
|
||||
"board_size": board_size,
|
||||
"difficulty_rating": difficulty,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue