so101-stacking-corpus / annotations /project_README.md
WoWjx's picture
Add artifact:README.md
386ed8e verified
|
Raw History Blame Contribute Delete
5.47 kB

SO101 causal steering masks — six-episode validation

Current framework: v2 documentation, typed annotations under v2/derived_annotations and review at v2/annotation_review/index.html. The material below documents the archived v1 pipeline.

Separate tooling for fixed-vocabulary T0/T1/T2 textual supervision. Raw LeRobot RGB/state/action, the collector, and Argus core are never written by these tools. The validation set is restricted to episodes 0–5.

Files and semantics

  • so101_annotations/taxonomy.py: 22 canonical labels (1 goal, 9 phases, 6 observed states, 6 recovery actions). Only templates generate training text.
  • prompts.py: coarse global and dense local prompts, plus prefix claim rules.
  • validate.py: deterministic contradictions and pending evidence produce REVIEW_REQUIRED; invalid annotations are never silently repaired.
  • model_outputs/: untouched OpenRouter responses from Pass A and Pass B.
  • requests/: exact prompts and paired image grids. Coarse sampling is 1 s; local sampling is 0.25 s. Timestamps are actual decoded video PTS.
  • reviewed_events.json: explicit visual refinements for this six-episode set. These are a review data file, not hard-coded rules in the annotation library.
  • prefix_decisions.json / prefix_checks/: assistant visual evidence audit. A prefix audit contains only frames at or before the claim's availability. This does not replace operator confirmation of ambiguous recovery or support.
  • derived_annotations/: canonical sidecars with intervals, mask bounds, availability, evidence and provenance. Prior revisions are archived separately.
  • visual_refinements.jsonl: append-only refinement provenance.
  • manual_corrections.jsonl: separate operator KEEP / ADJUST / DROP log.
  • steering_manifest.jsonl: review preview, not approved training data. Pending episodes have training_eligible=false, sample_loss_mask=0.

All masks are half-open [start,end). Availability is independently checked. Confirmed hold does not automatically create lift-off. State masks end when the predicate is no longer true; repeated grasps create separate state intervals. Stable support requires at least 0.75 s of post-release evidence; its availability is not backdated to release. No global timestamp offset is applied.

The annotations use video timeline timestamps. They are not sensor exposure timestamps and do not establish image/action hardware synchronization.

Review

Open annotation_review/index.html. This page also works from a Windows local copy without a server. It embeds data and uses relative JPEG links.

Each event shows proposed physical boundary, availability and mask interval, paired front/wrist frames, evidence and previous/next navigation. Default image view hides frames after availability. Enable later frames to compare boundaries.

KEEP confirms the event, its end/state loss and prefix evidence. ADJUST records edited times/label for revalidation; moving availability earlier revokes previous causal certification. DROP affects derived labels only, never raw frames.

Decisions persist in browser localStorage as drafts. Click Export manual_corrections.jsonl to save them to a separate file; import can restore an existing log. No browser action silently overwrites the original annotation.

Apply the exported file to a separate projection:

cd /home/wow/so101-steering
/home/wow/argus/.venv/bin/python tools/review_annotations.py apply \
  --annotations derived_annotations \
  --corrections manual_corrections.jsonl \
  --out effective_annotations

Then build the training manifest. The default command refuses unreviewed or inconsistent annotations:

/home/wow/argus/.venv/bin/python tools/build_steering_manifest.py \
  /home/wow/datasets/so101_rgb_blocks_20261001_224941 \
  --annotations effective_annotations --out steering_manifest_approved.jsonl

Use --allow-review-preview only for inspection, never as training approval. Optional --chunk-size N --stride-frames N evaluates text at each chunk's first frame and freezes it for that chunk. No future chunk event enters its anchor text.

Offline checks

cd /home/wow/so101-steering
/home/wow/argus/.venv/bin/python -m pytest tests -q

Reproduce annotation proposals

Do not run this simply to review existing results. Existing response files are skipped; new requests incur charges and must remain within the six-episode scope.

export SO101_OPENROUTER_WINDOWS_PROXY=1
/home/wow/argus/.venv/bin/python tools/annotate_masks.py \
  --episodes-root /home/wow/argus/data/episodes/so101/smoke \
  --clips /home/wow/argus/data/boards/so101_sol61_ep0_5/clips \
  --out /home/wow/so101-steering --episodes 0,1,2,3,4,5 \
  --stage A --max-spend 0.75

Pass B uses the same flags and --stage B. No model retries are automatic. --dry-run writes artifacts with zero API requests. The cost guard reserves a conservative request allowance, but the OpenRouter account currently has no account spending cap; the guard is not a server-enforced billing limit.

On this machine the optional transport uses Windows Python at D:\python311\python.exe and the existing proxy 127.0.0.1:7897. The key is read privately from the existing WSL key file. The default transport remains ordinary urllib. No key is stored in code or request artifacts.

Do not expand to 45 episodes or train until the six-episode review passes.