ml-failfast-validation_skill

This skill helps you enforce fail-fast validation for ML experiments by performing preflight checks, schema and gradient health validations, and NDJSON logging.
  • TypeScript

14

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill terrylica/cc-skills --skill ml-failfast-validation

  • SKILL.md15.8 KB

Overview

This skill provides fail-fast POC validation patterns to catch common ML experiment issues before committing expensive compute. It bundles quick model, gradient, schema, prediction sanity, and NDJSON logging checks so experiments either start clean or fail fast with actionable messages. The patterns are implementation-agnostic and focused on minimizing wasted GPU/time during development.

How this skill works

The skill runs a short preflight suite that instantiates a model, verifies forward/backward passes, inspects gradient health, and performs mini-training and prediction sanity checks. It validates data and event schemas, NDJSON logging structure, checkpoint save/load, and timing budgets. When any check fails it raises clear, actionable errors so you fix the root cause before launching long experiments.

When to use it

  • Before running a long training job or hyperparameter sweep
  • When validating a new model architecture or data pipeline
  • To check gradient flow and detect NaNs/Inf or zero gradients
  • When adding new feature computation or data sources
  • Before committing experiments to shared GPU resources

Best practices

  • Run the full POC validation on CI or as a pre-commit/preflight step
  • Prefer relative thresholds (e.g., pred_std / target_std) over absolute numbers
  • Fail loudly: raise detailed errors rather than silencing exceptions
  • Keep POC checks short (<2 minutes) and focused on actionable failures
  • Log NDJSON events with required fields so downstream tooling can validate runs

Example use cases

  • Quickly validate a new LSTM/transformer architecture for gradient flow and gate biases
  • Checkpoint sanity: save then reload model weights before full training
  • Detect collapsed or exploded predictions on a small test split to avoid wasted training
  • Validate that feature pipeline produces required columns at pipeline boundaries
  • Preflight NDJSON logging schema so experiment dashboards ingest clean events

FAQ

A minimal POC includes model instantiation, a gradient backprop check, NDJSON artifact write, selector/epoch variation test, and a short mini-training loop.

How do I detect collapsed predictions?

Compute pred_std / target_std and fail if the ratio is below a small relative threshold (e.g., 0.5%). Also check unique value counts and correlation with targets.

When should I add architecture-specific checks?

Add them when you introduce recurrent or gated layers (LSTM/GRU) to validate gate biases and hidden-to-hidden gradient norms.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
ml-failfast-validation skill by terrylica/cc-skills | VeilStrat