babysit-job
Monitor/babysit a job continuously and recover on failure. Use when asked to babysit, monitor, or watch a job, pipeline, workflow, or training run.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Monitor/babysit a job continuously and recover on failure. Use when asked to babysit, monitor, or watch a job, pipeline, workflow, or training run.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Evaluate a MarinFold contacts-v1 checkpoint with the fixed exp89 contact benchmark. Use for checkpoint scoring, R-precision/AUC requests, comparisons with structure baselines, or reproducing contact metrics on local, CUDA, or Iris TPU execution.
Write a Zephyr/Iris data-generation pipeline that finishes in minutes (not hours) and ships a clean corpus (not a silently-corrupted one). Use when authoring or reviewing an `exp<N>_data_*/cli.py` (or any `map_shard`-based job that fetches per-row inputs and emits parquet). Covers the per-row / per-shard / per-worker / per-job decisions for wall-clock plus the fail-loud default for data quality — including **neural / accelerator (TPU) tokenizers** when the model is the cost (batched bucketed inference, `ResourceConfig.with_tpu`, and parallel scans for sequential-recurrence models like SSMs/RNNs).
Start, monitor, and babysit Zephyr pipeline jobs on Iris. Use when launching a zephyr job, watching it run, or restarting after failures.
| name | babysit-job |
| description | Monitor/babysit a job continuously and recover on failure. Use when asked to babysit, monitor, or watch a job, pipeline, workflow, or training run. |
Monitor a job continuously and recover on failure. For Zephyr pipelines, delegate to babysit-zephyr instead. Otherwise, follow this skill — Iris is the execution backend.
Ported from marin-community/marin/.agents/skills/babysit-job/SKILL.md with
MarinFold-specific adaptations. The marin-MCP-babysitter integration section
from the upstream skill is dropped (MarinFold does not currently bundle
marin-mcp-babysitter); plain Iris CLI monitoring is fine for our scale.
job_id — Iris job ID in canonical format /<user>/<job> (e.g., /timodonnell/iris-run-train_protein_30m-20260512-185630).config — Iris config path. MarinFold does not vendor iris configs into the
repo — point at whichever YAML file the user maintains for the cluster they
want to run on. The marin repo (or the marin-iris wheel) ships example
configs at lib/iris/examples/<cluster>.yaml. Common shorthands:
marin / marin_prod → lib/iris/examples/marin.yamlmarin_dev / marin-dev → lib/iris/examples/marin-dev.yamlcoreweave → lib/iris/examples/coreweave.yamlresubmit_command — exact Iris submit command for resubmission; must
include --no-wait.--extra tpu (the experiment's
pyproject.toml declares the [tpu] extra; see e.g.
experiments/exp0_models_protein_docs_initial_port/pyproject.toml).--tpu <variant>. --reserve <variant> only holds capacity; it does not
attach TPU devices to the task container.Example resubmit command:
uv run iris --config <CONFIG> job run --no-wait \
--extra tpu --tpu v5p-8 --zone us-east5-a \
-- python -m train_protein_30m_distance_masked
If any required field is missing, ask for it before proceeding.
If this is the first time you see a W&B URL for the job, create a run history file:
python scripts/history.py new \
--wandb-url <URL> --wandb-name <NAME> \
--experiment <exp<N>_<kind>_<name>-or-no_experiment> \
--kind <models|evals|data|document_structures|other> \
--short "<one-line description>" \
--iris-jobs <JOB_ID>
On every restart (step 7 below), append the new iris job ID:
python scripts/history.py add-iris-job <run-stem-or-wandb-name> <NEW_JOB_ID>
See history/README.md for the policy.
job_id,
latest error/signal, W&B link(s), resubmission metadata, and the
history/runs/*.md filename if one exists.sleep 570.120 and check for immediate failure570 cadenceWrite to scratch/<create_timestamp>_monitoring_state.json, create the scratch
directory if needed. <create_timestamp> should have format YYYYMMDD-HHMM.
Track restart_count to detect flapping. State file allows resume after context reset.
{
"ts": <timestamp_ms>,
"job_id": "<JOB_ID>",
"config": "<IRIS_CONFIG_PATH>",
"wandb_url": "<URL>",
"wandb_name": "<NAME>",
"history_file": "history/runs/<YYYYMMDD>_<experiment>_<wandb_name>.md",
"resubmit_command": "<IRIS_JOB_RUN_COMMAND_WITH_NO_WAIT>",
"restart_count": 0
}
scratch/ is gitignored.
1. SLEEP
- if just submitted/restarted: sleep 120 once
- otherwise: sleep 570
2. CHECK LOGS
uv run iris --config <CONFIG> job logs --since-seconds 900 <JOB_ID> | rg -i \
-e "loss|error|traceback|exception|resource_exhausted|oom" \
-e "compiler_base\.cc:2587|program hbm requirement|largest program allocations" \
-e "ownerdiederror|dead node|node death|autoscaler unsatisfied resources" \
-e "no accelerator found|failed_precondition|device or resource busy"
`iris job logs <JOB_ID>` includes child-job task logs by default.
3. CHECK STATUS
uv run iris --config <CONFIG> job list --json --prefix <JOB_ID>
Terminal success: JOB_STATE_SUCCEEDED
Terminal non-success: JOB_STATE_FAILED, JOB_STATE_KILLED, JOB_STATE_WORKER_FAILED, JOB_STATE_UNSCHEDULABLE
Non-terminal: JOB_STATE_PENDING, JOB_STATE_BUILDING, JOB_STATE_RUNNING
If `pending_reason` indicates worker scale-up/capacity wait, treat as scheduler
capacity wait — do not run cluster update/recreate/restart actions. Continue
waiting on cadence, or stop+resubmit only if user explicitly asks.
Treat RUNNING as controller-level signal only; confirm allocation via expected
W&B run when possible.
3a. ON TERMINAL STATE / OOM-LIKE SIGNAL — get a structured per-task summary
(final state, exit, duration, peak memory) instead of grepping logs:
uv run iris --config <CONFIG> job summary --json <JOB_ID>
Fast postmortem: e.g. "13/14 shards peaked near the container memory limit
and failed with exit 137" → cgroup OOM, raise `--memory` on resubmit.
4. PRINT W&B RUN IDS/LINKS (once per training run)
5. CREATE / UPDATE HISTORY FILE
- First time seeing the W&B URL: `python scripts/history.py new ...`
- Every restart: `python scripts/history.py add-iris-job ...`
6. REPORT PROGRESS (format: ~<current>/<exact_max> steps)
7. EVALUATE (terminal? error? stalled? -> recover or continue)
8. RECOVER (STOP -> RESUBMIT)
- If current job is still non-terminal, stop it first:
uv run iris --config <CONFIG> job stop <JOB_ID>
- Then resubmit:
<RESUBMIT_COMMAND>
- Capture `job_id` from output (line like `Job submitted: /<user>/<job>`).
- Iris nuance:
- if `resubmit_command` omits `--job-name`, Iris auto-generates a fresh id each resubmission.
- if `resubmit_command` uses a fixed `--job-name`, Iris may reuse the same id
after terminal completion by replacing the finished job.
- Append the new job id to the history file:
python scripts/history.py add-iris-job <run-stem> <NEW_JOB_ID>
- Update state file: `job_id=<NEW_JOB_ID>`, `restart_count += 1`.
- Go to step 1.
When EVALUATE detects an error, before recovery:
Traceback, Error, Exception. Identify file and line.Small-fix examples: NameError, ImportError, SyntaxError, obvious KeyError.
Complex examples: OOM, TPU/XLA HBM exhaustion, distributed training failures, data loading issues, unclear multi-file stack traces.
Program hbm requirement ...Largest program allocations in hbmOwnerDiedError, dead node,
or unsatisfied resources -> mark degraded and notify user.us-east5-a for marin-us-east5). See
models/AGENTS.md "Co-locate TPU with checkpoint bucket".vocab_size mismatch usually means the
HF tokenizer URL was rewritten without a revision pin. See
models/AGENTS.md "Tokenizer revisions are pinned".iris task exec → debug-iris-job (not yet ported).job list --prefix requires canonical job names (/<user>/<job>), not short names.