# Diagnose ML Training Failures

Training failures are hard to debug when logs, curves, code, and configs point in different directions. This skill organizes the evidence and returns likely root causes, fixes, and verification steps.

## Install

```bash
npx skillstore add dnyoussef/ml-training-debugger
```

## Metadata

- Status: approved
- Slug: dnyoussef-ml-training-debugger
- Skillstore revision: r1
- Version status: missing
- Tree hash: 3b73ec47c4305b7dce5ecd2fbe1c5bb5b7904801e32d04a5a65b3ac49cf4a8fa
- Author: DNYoussef
- GitHub username: DNYoussef
- License: MIT
- Repository: https://github.com/DNYoussef/ai-chrome-extension/tree/main/.claude/skills/ml-training-debugger
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 70
- Public page: https://skillstore.pages.dev/skills/dnyoussef-ml-training-debugger
- Manifest: https://skillstore.pages.dev/api/skills/dnyoussef-ml-training-debugger/manifest

## Capabilities

- Classifies training symptoms such as divergence, collapse, NaN loss, and stalled learning.
- Reviews logs, loss curves, model code, configs, and error messages for diagnostic evidence.
- Ranks likely root causes with confidence levels and supporting observations.
- Suggests fixes for learning rates, gradients, architecture balance, and training loop issues.
- Provides verification steps to confirm whether a proposed fix worked.

## Use Cases

- Triage Failed Training Runs: Identify why loss diverged, gradients exploded, or training stopped improving.
- Investigate Model Collapse: Analyze repeated outputs, low diversity, or architecture imbalance before redesigning experiments.
- Debug Training Infrastructure Errors: Review CUDA, checkpoint, dataloader, and framework errors from training logs.

## Prompt Templates

### Diagnose a Failed Run

```
Diagnose my ML training run. Symptoms: [describe issue]. Logs: [paste key logs]. Config: [paste key settings]. Provide likely causes and fixes.
```

### Explain Loss Divergence

```
Analyze this loss divergence. Include the failure point, likely gradient or learning rate causes, supporting evidence, and a safe first fix.
```

### Compare Failure Hypotheses

```
Compare these possible causes: [list causes]. Use my logs, gradients, model summary, and config to rank them by evidence and confidence.
```

### Audit Training System End to End

```
Perform an end-to-end diagnosis of this training failure. Review logs, curves, architecture, optimizer setup, dataloader behavior, and hardware errors. Prioritize fixes.
```

## Limitations

- It depends on the quality and completeness of provided training artifacts.
- It does not directly modify model code or training configs.
- It cannot prove dataset quality issues without dataset access or representative samples.
- Hardware-specific conclusions may need confirmation on the target training environment.

## Best Practices

- Provide logs, configs, loss curves, model summaries, and exact error messages together.
- Ask for evidence-ranked causes before changing several parameters at once.
- Verify each fix with one controlled rerun and tracked metrics.

## Anti Patterns

- Do not request a diagnosis from only a vague symptom description.
- Do not apply multiple high-impact fixes before measuring the first result.
- Do not treat confidence scores as proof when key artifacts are missing.

## Security Audit

- Audited at: 2026-07-05T13:47:28.373\+00:00
- Summary: The static backtick and reconnaissance alerts are false positives caused by Markdown fences, inline code formatting, and ML diagnostic wording. A separate semantic issue remains: the example agent configuration enables Bash despite describing the specialist as read-only.

## Stats

- Views: 229
- Downloads: 5
- Favorites: 0
- Popularity score: 0
