Logging & Debugging
Monitor training progress and diagnose issues.Logging Options
Weights & Biases
- Real-time loss curves
- Hardware metrics
- Hyperparameter tracking
- Model artifacts
TensorBoard
W&B Visualizer (LEET)
Built-in terminal visualizer that shows real-time metrics in your terminal.The W&B visualizer is enabled by default when using
--log wandb. Use --no-wandb-visualizer to disable it.Logging Steps
Control logging frequency:Verbose Output
Capture Full Logs
Environment Variables
These environment variables affect logging and debugging behavior:Noise Suppression
These are set automatically to reduce log noise:Common Issues
Out of Memory (OOM)
Symptoms:- “CUDA out of memory” error
- Training crashes suddenly
Slow Training
Check:- GPU utilization:
- Enable optimizations:
- Data loading bottleneck:
- Ensure data is on fast storage (SSD)
- Pre-process data to reduce tokenization overhead
- Use smaller sequence lengths if possible
NaN Loss
Symptoms:- Loss becomes NaN
- Training diverges
Data Issues
Symptoms:- Unexpected behavior
- Poor model quality
Checkpointing
Save Strategy
Resume Training
If training crashes, resume from checkpoint:Monitoring Tools
GPU Monitoring
System Resources
Debugging Checklist
- Check logs - Look for error messages
- Verify data - Ensure correct format
- Check GPU - Memory and utilization
- Try smaller - Reduce batch/model size
- Isolate issue - Minimal reproduction
Next Steps
Batch Processing
Run multiple experiments
Pipeline Automation
Automate workflows