mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
fix for paper spec
This commit is contained in:
parent
d795ba68c9
commit
18ff9868df
1 changed files with 4 additions and 8 deletions
|
|
@ -63,12 +63,8 @@ class PathStarDataset(ProceduralDataset):
|
|||
edges.extend(zip(p[:-1], p[1:]))
|
||||
rng.shuffle(edges)
|
||||
|
||||
# serialise graph
|
||||
lines = [f"e {u} {v}" for u, v in edges]
|
||||
lines.append(f"S {center}")
|
||||
lines.append(f"G {goal}")
|
||||
lines.append("?")
|
||||
prefix = "\n".join(lines)
|
||||
edges_str = "".join(f"|{u} {v}" for u, v in edges)
|
||||
prefix = f"{edges_str}/{center} {goal} ="
|
||||
|
||||
# gold path
|
||||
gold = [center] + goal_path
|
||||
|
|
@ -77,9 +73,9 @@ class PathStarDataset(ProceduralDataset):
|
|||
answer = " ".join(map(str, gold))
|
||||
|
||||
if cfg.teacherless:
|
||||
q = "X" * len(prefix) # same length dummy token(s)
|
||||
q = prefix + " $" * len(gold) # same length dummy token(s)
|
||||
else:
|
||||
q = prefix
|
||||
q = prefix + " "
|
||||
|
||||
return {
|
||||
"question": q,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue