Skip to content
Back to skills

Training Evaluation

ASecurity

"Train, evaluate, checkpoint, and troubleshoot Detectron2 models

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
toolspythondebuggingapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill training-evaluation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Training Evaluation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Training Evaluation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-training-evaluation-46658bff/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-training-evaluation-46658bff)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: training-evaluation
description: "Train, evaluate, checkpoint, and troubleshoot Detectron2 models
  with safe commands and APIs."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Detectron2 Training & Evaluation

Use this sub-skill when the task is to run or prepare Detectron2 training/evaluation, customize trainers/hooks/evaluators/checkpointing, or diagnose training/eval failures. It assumes datasets and configs have already been selected or registered by the dataset/configuration sub-skills.

## Fast Routing

- Build safe training/eval commands with `scripts/train_command_builder.py`; it prints commands only and never starts training.
- Plan evaluator/checkpoint setup with `scripts/evaluation_plan.py`; it prints checks and next steps only and never runs evaluation.
- Read `references/training-workflows.md` for standard Detectron2 train/eval driver semantics, `DefaultTrainer`, `SimpleTrainer`, hooks, launch, solver scaling, and resume/eval-only behavior.
- Read `references/evaluation-checkpointing.md` for evaluator selection, `inference_on_dataset`, `verify_results`, `DetectionCheckpointer`, and checkpoint loading/resume behavior.
- Read `references/troubleshooting.md` before starting long jobs, changing GPU count, using a custom dataset, switching Yacs/LazyConfig syntax, or debugging failed evaluation.

## Safe Defaults

- Prefer a dry-run command/planning step before running a long job; stop for user approval when training would be long, multi-GPU, dataset-heavy, or hardware-dependent.
- Use a project-local driver with the standard Detectron2 parser shape: `python PROJECT_TRAIN_DRIVER.py --config-file CONFIG --num-gpus N [--resume|--eval-only] KEY VALUE ...`.
- Use LazyConfig syntax only for Python config files: `python PROJECT_LAZY_TRAIN_DRIVER.py --config-file CONFIG.py train.output_dir=... dataloader.train.total_batch_size=...`.
- Do not use the repository demo CLI as a runtime dependency; in this checkout its demo imports a missing `vision.fair.detectron2.demo.predictor` module.

## Common APIs

- Yacs training: subclass `DefaultTrainer`, override `build_evaluator`, optionally override `build_train_loader`, `build_optimizer`, `build_lr_scheduler`, or register hooks.
- Minimal loop: use `SimpleTrainer(model, data_loader, optimizer)` when `DefaultTrainer` assumptions are too restrictive.
- Distributed entry: call `launch(main_func, num_gpus_per_machine, num_machines=1, machine_rank=0, dist_url=None, args=())`.
- Evaluation: use `COCOEvaluator`, `SemSegEvaluator`, `DatasetEvaluator`, `DatasetEvaluators`, and `inference_on_dataset(model, data_loader, evaluator)`.
- Checkpointing: use `DetectionCheckpointer(model, save_dir, trainer=trainer)` and distinguish `load`, `resume_or_load`, `--resume`, and `--eval-only`.

Files in this skill

  • SKILL.md2.8 KB
  • references/evaluation-checkpointing.md5.3 KB
  • references/training-workflows.md9.1 KB
  • references/troubleshooting.md6.2 KB
  • scripts/evaluation_plan.py4.9 KB
  • scripts/train_command_builder.py4.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.