计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
training-and-validation【效率与协作】Plan and troubleshoot Ultralytics YOLO training, validation, resume, tuning, device selection, trainer/validator ownership, and metrics workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user needs to train or validate Ultralytics models through model.train(), model.val(), model.tune(), yolo train, or yolo val, including resume behavior, CPU/GPU/MPS device choices, and metric interpretation.
yolo TASK MODE arg=value or Python YOLO(...).train()/val()/tune().last.pt, diagnosing missing or non-resumable checkpoint state, or choosing between resume and a fresh fine-tune.device, batch, workers, amp, compile, cache, fraction, patience, optimizer, and tuning options for constrained hardware.metrics.box.map, metrics.box.map50, metrics.confusion_matrix, to_df(), to_csv(), and to_json().../data-and-configuration/SKILL.md.../model-families-and-tasks/SKILL.md.../inference-and-results/SKILL.md.../export-and-deployment/SKILL.md.../tracking-and-solutions/SKILL.md.../repo-development/SKILL.md.references/workflows.md for train, validation, resume, tuning, device, and metrics patterns.references/api-reference.md for Python API/CLI argument shape and trainer/validator ownership.references/troubleshooting.md for install/import, CLI syntax, data/config, backend/device, network/download, checkpoint, and side-effect failures.scripts/plan_training_run.py to generate safe CPU/tiny-fixture train/val/tune command plans without executing training.Prefer a dry plan before running any training. For smoke tests or examples, default to device=cpu, imgsz=32, epochs=1, batch=1, workers=0, plots=False, and a tiny dataset such as coco8.yaml only when a download is acceptable. If the user wants to avoid downloads, require a local dataset YAML or prepared fixture and route data-layout checks to data-and-configuration.
yolo detect train model=yolo26n.pt data=coco8.yaml epochs=1 imgsz=32 device=cpu batch=1 workers=0 plots=False
yolo detect val model=yolo26n.pt data=coco8.yaml imgsz=32 device=cpu batch=1 plots=False
python scripts/plan_training_run.py --mode train --task detect --model yolo26n.pt --data coco8.yaml --cpu-tiny
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
metrics = model.train(data="coco8.yaml", epochs=1, imgsz=32, device="cpu", batch=1, workers=0, plots=False)
metrics = model.val(data="coco8.yaml", imgsz=32, device="cpu", batch=1, plots=False)
Training and validation create run directories and may download model weights or datasets when names such as yolo26n.pt or coco8.yaml are not already available. Always surface those side effects before execution, and use the bundled planner script when the user asks for a safe plan rather than an actual run.