Skip to main content

TASK - LLMOps (checkpoints, eval loop, monitoring)

Objective: every checkpoint traceable, every benchmark number measured-or-NOT_MEASURED, regressions caught by rerunning evals - not vibes.

1. Checkpoint registry (convention, enforced by code)​

  • Layout per training/checkpointing.py: model.pt, tokenizer/, earth_onevision_metadata.json, optimizer.pt/scheduler.pt.
  • Name: checkpoints/final/, checkpoints/stage2/final/, checkpoints/stage1/final/, or checkpoints/baseline-small/final/ (+ date suffix for repeats, e.g. final-india-2026-09-15).
  • Every checkpoint self-labels earth_onevision_reproduction_checkpoint; load_checkpoint refuses anything else. Never rename a dir without its metadata.
  • Point serving at it two ways (keep in sync): SATQUERY_CHECKPOINT env and configs/inference.yaml:checkpoint.path.

2. Eval loop (after every training run)​

bash scripts/evaluate.sh vqa preds_rsvqa_hr.jsonl # per-task: vqa|classification|captioning|grounding|detection|segmentation|change_detection|visual_prompting|relation_reasoning
python evaluation/paper_results.py --reproduced results/reproduced.json
  • Predictions format: evaluation/common.py ({"prediction":…, "reference":…} JSONL).
  • paper_results.py prints NOT_MEASURED for anything unmeasured - that is the honest state, never hand-fill it.
  • Compare against paper targets in docs/paper_spec.md Sec. 4; record deltas in docs/REPRODUCTION_REPORT.md.

3. Monitoring (minimal, no new infra)​

  • Liveness: GET /api/health.
  • Per-request trace already exists: classified task, selected tool, input config, latency, confidence (app/backend/controller.py, report.py) + downloadable JSON report - archive these per demo/eval; they are your inference log.
  • Training: watch loss + grad-norm in trainer stdout; checkpoint every 500 steps is your recovery point.
  • Data hygiene: tools/validate_dataset.py --intended-use train on every manifest before training (leakage gate).

Done criteria​

  • New checkpoint dir follows naming + loads via both generate.py --model and SATQUERY_CHECKPOINT
  • results/reproduced.json refreshed; unmeasured rows say NOT_MEASURED
  • REPRODUCTION_REPORT.md updated with measured numbers from this machine

Debug​

SymptomCause → fix
load_checkpoint refuses fileprovenance label mismatch - it only loads reproduction checkpoints, by design
Metric script rejects predictionswrong JSONL shape - match evaluation/common.py exactly
Good loss, bad evalsleakage or manifest mix-up - revalidate manifests, confirm stage1 vs stage2 data split