Skip to content

Releases: Axect/pytorch_template

v0.3.0 — Dual Logging, TUI Monitor & Migration Skill

08 Apr 05:35

Choose a tag to compare

New Features

  • Dual logging: logging: wandb (default) or logging: tui for agent-friendly terminal output
  • CSVLoggingCallback (always active): writes metrics.csv every epoch with dynamic column expansion
  • TUILoggingCallback: structured per-epoch terminal output replacing W&B
  • LatestModelCallback (always active): saves latest_model.pt every epoch
  • Rust TUI monitor (tools/monitor/): real-time loss curve visualization from metrics.csv
  • Provenance tracking: env_snapshot.yaml + run_metadata.yaml per run
  • doctor CLI command: system environment health check
  • monitor CLI command: launch TUI monitor with auto-detection

Improvements

  • Loss prediction: shifted exponential decay L(t) = a·exp(-b·t) + c
  • Complete migration skill documentation (M1–M6) with template-clone approach
  • Pre-push hook enforcing migration doc updates on source changes

Migration

Existing users can update their projects:

# Install the migration skill globally (once)
mkdir -p ~/.claude/skills
cp -r .claude/skills/pytorch-migrate ~/.claude/skills/

# In any pytorch_template-based project:
/pytorch-migrate

Full changelog: v0.2.0...v0.3.0

v0.2.0 — Full Research Pipeline with AI Agent Skills

27 Mar 01:38

Choose a tag to compare

What's New

Pre-flight Check

Run 1 batch forward+backward before training to catch config errors in seconds:

python -m cli preflight configs/run_template.yaml --device cuda:0

Detects shape mismatches, NaN/Inf gradients, scheduler param issues, and estimates GPU memory.

HPO Analysis

After HPO, understand what Optuna found:

python -m cli hpo-report --opt-config configs/my_opt.yaml

Shows parameter importance (fANOVA), boundary warnings, and top-K trial comparison.

Training Diagnostics

Two always-on callbacks logged to W&B:

  • GradientMonitorCallback — exploding gradient detection
  • OverfitDetectionCallback — train/val loss divergence warning

Pluggable Data Loading

New data field in config YAML points to any load_data() function via importlib:

data: recipes.regression.data.load_data

3-Tier Config Validation

Structural → Runtime → Semantic (catches upper_bound < total_steps, negative lr, duplicate seeds, etc.)

AI Agent Skills

  • pytorch-train — Guides the full experiment lifecycle
  • pytorch-migrate — Detects project version and applies migrations

Documentation

Rewritten as "Human Skill Guide" — 5 chapters. The human counterpart to the AI agent's SKILL.md.

Migration

Existing users: add data: util.load_data to YAML configs, or run /pytorch-migrate with Claude Code.
No breaking changes — the data field defaults to util.load_data.