Recovery controller for halted runs
harbor run -t valenlabs/workcell-c7harbor download valenlabs/workcell-c7recover.py, a recovery controller for halted runsWrite recover.py with def main(session, notes) -> None. At grading it runs, with no model in the loop, once on each of 40 hidden halted cells, each a fresh cell. It drives the cell through the client session. notes is a store with read() -> bytes and write(data: bytes), at most 1,048,576 bytes; it is the only thing that survives a kill.
advance(until_ms, wake_on=[job ids]).
until_ms must be a finite time.until_ms, the completion of a named job, an alarm, or the timer reaching zero.timer reports the time, the time remaining, the phase and the budgets left.freeze, or done. Jobs in flight are then cancelled without credit, and value, charges and the report are read at that instant.status, journal, timer, report and done, from a reserve of 200 requests. done is rejected while no report is on file.Each state is scored on three anchors:
Further rules:
A practice cell loads 8 public halted states, with the kill and the restart where those states have one. It can be restarted as often as you like.
Hand in /logs/artifacts/recover.py (kind recovery). Entry points: main.
It is graded on hidden tapes, one fresh cell per tape (MANUAL section 15).
Your shift is measured by its value V (higher is better) and scored against three anchors: the naive anchor (the best member of the naive family on the practice states; programs that clear the gripper, withhold or read the incubating plates by the journal taken at face value, and dose and read the untouched plates), the reference anchor (a program that reconstructs every dose time from the journal and the device records, plans the reads with an assignment over reader slots, probes the plates whose age is uncertain when the probe is worth its arm time, keeps its notes, and reports by expected value, scored 1/2) and the top anchor (a proven upper bound computed with the true state, the true dose times and the kill time known, scored 1). Scores below the naive anchor count down to −1 before averaging; the mean is cut to 0..1. A gate break scores its own tape −1; the other tapes are unaffected. Task-level rate: when at least 2 tapes break a gate and they are more than 2% of the tapes, the reward is 0.
You have 6 hours (21600000 ms) of wall-clock time. The cell freezes control 10 minutes (600000 ms) before that limit; call session.timer() to see the wall time left.
/workspace/MANUAL.md: the manual, with every rule and number of this task./workspace/task_public.task: the task file./workspace/harness/: the published harness code of this hand-in.from workcell.client_v2 import connect.This manual, the instruction and the task file task_public.task are the rules of this task and are true. Files under logs/ are records left by earlier operators; they may not hold for this run.
No run log is shipped with this task.