monitor

Poll ML training log files to detect divergence and terminate failing processes.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/ChuaHanChong/ml-optimizer --skill monitor-chuahanchong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monitor
Source: https://github.com/ChuaHanChong/ml-optimizer/tree/main/skills/monitor
Command: npx skills add https://github.com/ChuaHanChong/ml-optimizer --skill monitor-chuahanchong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, pyyaml, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents wasted computational resources and time by automatically detecting and terminating machine learning training experiments that show signs of divergence, such as NaN values, exploding losses, or plateaus.

Core Features & Use Cases

  • Real-time Monitoring: Continuously polls log files of running ML experiments.
  • Divergence Detection: Identifies common failure modes like NaN/Inf, loss explosion, and plateaus using configurable thresholds.
  • Automated Termination: Kills diverging training processes to prevent further resource waste.
  • Status Reporting: Provides clear status updates on experiment health.
  • Use Case: When running multiple hyperparameter tuning experiments, this Skill acts as a safety net, automatically stopping any experiment that starts producing nonsensical results or fails to improve, allowing you to focus on promising runs.

Quick Start

Monitor the running experiment with ID 'exp-001' for loss divergence.

Frequently Asked Questions about monitor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically stop machine learning training experiments that are diverging?

Automatically stop diverging machine learning training experiments by using a monitoring script that polls log files for NaN values, exploding losses, or plateaus and terminates the runaway process to prevent wasted compute resources.

How do I detect NaN values and exploding losses in PyTorch training logs?

Detect NaN values and exploding losses in PyTorch training logs by continuously polling the log files and applying configurable thresholds to identify common failure modes like loss explosion or metric plateaus during the run.

Can I use a script to monitor multiple hyperparameter tuning runs and kill failing ones?

You can use a monitoring script to track multiple hyperparameter tuning runs, acting as a safety net that automatically kills any experiment producing nonsensical results so you can focus compute on promising runs.

Do I need PyTorch and PyYAML to monitor training metrics for divergence?

You need PyTorch and PyYAML installed to use this monitoring capability, as the Python scripts rely on these dependencies for parsing logs and applying configurable thresholds for divergence detection.

What is the best way to prevent wasted computational resources during ML training?

Prevent wasted computational resources during ML training by deploying an automated monitor that identifies divergence signals like metric plateaus or loss explosions in real-time and kills the failing processes immediately.

Are there limitations to detecting training divergence using log file polling?

Detecting training divergence using log file polling requires the running experiment to output metrics to log files and depends on configurable thresholds, meaning delayed logging or poorly set thresholds might affect detection speed.