forge-train
Skill1 starsChanged 6 months agoMITView on GitHub
Generates a training config YAML from manifest.plan + plan.json training_overrides, uploads to the EC2 instance, launches train.py detached via setsid + nohup, captures PID, and starts a 30-second log-sync side process to S3. Returns immediately — never blocks. Strips the v2- prefix from FORGE_ID so v2-bridged runs find the right plan.json.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Write manifest.training_runtime.* and advance to MONITOR
- Very specific: line 37
If training_runtime.pid is set AND alive on the instance, exits 0.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
forge-train
When this fires
Phase position: TRAIN — after forge-bootstrap, before forge-monitor.
Spends GPU time — main training spend.
What it does
- Resolve plan.json (strip
v2-prefix from FORGE_ID for v2-bridged runs) - Layer hyperparams: defaults → plan.json
training_overrides→FORGE_TRAIN_*env vars - Generate the training config YAML (frameworks: unsloth or huggingface-trainer)
- Upload config + dataset references to
/workspace/on the instance via SSM - Launch
nohup setsid python train.py ...detached → capture PID - Spawn a side process that
aws s3 syncthe log file every 30 s - 30 s health probe — if PID is dead by now, fail fast (early crash)
- Write
manifest.training_runtime.*and advance toMONITOR
Inputs
$1= forge-id (orv2-<run-id>)manifest.plan.{base_model, regime, target_params, framework}manifest.artifacts.shaped_corpus_s3plan.json.training_overrides(v2 bridge — max_steps, batch, lora_r, etc.)FORGE_TRAIN_*env vars (highest precedence overrides)
Outputs
manifest.training_runtime.{pid, log_path_s3, config_yaml_s3, framework, started_at}/workspace/logs/train.log(synced every 30 s)manifest.state.current_phase = MONITOR
Idempotency
If training_runtime.pid is set AND alive on the instance, exits 0.
Failure modes
| Exit | Reason | Recoverable? |
| 0 | training launched + PID alive | – |
| 1 | config validation failed (non-recoverable: bad plan) OR PID died within 30 s health probe (often OOM — recoverable via batch-size shrink) | mixed |
| 64 | no forge-id provided | no |
External resources
- AWS EC2 (SSM RunCommand for setsid launch + log-sync rsync)
- AWS S3 (config + log uploads)
- HuggingFace model cache (instance pulls base model on first step)
Cost class
spends GPU time — main training spend window opens here.
Depends on
forge-bootstrap(venv + deps installed)forge-shape(shaped corpus in S3)
In this repository29 other files it gives its agents.
- slm-forgeSkill
- forge-analyzeSkill
- forge-architectSkill
- forge-auditSkill
- forge-bootstrapSkill
- forge-card-validatorSkill
- forge-curateSkill
- forge-estimateSkill
- forge-evalSkill
- forge-ingest-dbSkill
- forge-ingestSkill
- forge-intakeSkill
- forge-monitorSkill
- forge-plan-fitSkill
- forge-planSkill
- forge-preflightSkill
- forge-prepSkill
- forge-provisionSkill
- forge-publishSkill
- forge-quantizeSkill
- forge-registerSkill
- forge-reportSkill
- forge-resumeSkill
- forge-shapeSkill
- forge-smoketestSkill
- forge-sourceSkill
- forge-statusSkill
- forge-synthSkill
- forge-teardownSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

