aien-train
AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.
Brought by drakestapleton
aien-train / eval / omegese45 / oe_episode.py
| 1 | """Interface v1.3 refinements around the immutable v1.1 sealed oracle. |
| 2 | |
| 3 | The committed oe45lib.py and oe_sealgen.py bytes stay unchanged: this wrapper |
| 4 | only rejects newly clarified illegal episode shapes and handles terminal-job |
| 5 | binding without calling the frozen library with None. It changes neither the |
| 6 | sealed messages nor their reference answers, metrics or denominators. |
| 7 | """ |
| 8 | import oe45lib as L |
| 9 | |
| 10 | |
| 11 | def check_episode_shape(msgs): |
| 12 | why = L.check_episode_shape(msgs) |
| 13 | if why: |
| 14 | return why |
| 15 | refuses = [i for i, m in enumerate(msgs) if m.kind == "A" and m.jk == "refuse"] |
| 16 | if refuses and not (refuses == [1] and len(msgs) == 3 |
| 17 | and msgs[2].text == "rep refused bound end"): |
| 18 | return "refuse-not-sole-first-A-followed-by-bound-P" |
| 19 | return None |
| 20 | |
| 21 | |
| 22 | def bind_current(goal, act, prefix): |
| 23 | j = L.current_job_index(prefix) |
| 24 | if j is None: |
| 25 | return False, "binding: no current job" |
| 26 | return L.binding_ok(goal, act, j) |