Skip to main content

A deterministic linter for ML training runs: dataset, tokenizer, and epoch logs.

Project description

Trainproof

A deterministic linter for ML training runs. Run it on your dataset, tokenizer, and first-epoch logs — it gives a deterministic PASS/WARN/FAIL verdict with named findings and suggested fixes, BEFORE you burn weeks of GPU time.

Installation

pip install .

Usage

Exactly three subcommands:

1. Dataset Preflight

trainproof data /path/to/dataset

Checks audio integrity (clipping, silence, duration distribution) and transcript quality (unnormalized text, charset audit, duration correlation).

2. Tokenizer Preflight

trainproof tokenizer my_model.model transcripts.txt

Checks vocabulary coverage, tokens-per-second, and suspicious splits on numbers/dates.

3. First-Epoch Verification

trainproof epoch logs/epoch1.jsonl

Analyzes loss curves (divergence, flatlines, NaN), grad norms, learning rate response, and throughput.

Supported log formats

  • Generic JSONL / CSV
  • HuggingFace (trainer_state.json)
  • Coqui TTS Trainer (plain text trainer_0_log.txt)

Roadmap: TensorBoard event files planned (v0.2) — Lightning console captures are TTY dumps, not logs, and will not be supported.

Verdict Rules

All verdict rules are deterministic thresholds defined centrally in src/trainproof/rules.py. Examples include:

  • MAX_CLIPPING_PEAK = 0.99
  • MAX_LOSS_DIVERGENCE_RATIO = 1.5
  • MIN_VOCAB_COVERAGE = 0.999

Explicit Non-Goals

  • No live learning-rate auto-adjustment.
  • No PyTorch/Lightning callbacks or framework hooks (log files only).
  • No MCP server, no LLM integration.
  • No dashboards/wandb-style UI.
  • No extra features beyond this spec.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trainproof-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trainproof-0.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file trainproof-0.1.0.tar.gz.

File metadata

  • Download URL: trainproof-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for trainproof-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d7ff1b1685210a8f61329e93a6688bd498ea1625cb8b94bf2587afd66b9252d
MD5 3df7dce1bd13cd308570b4acc3a0c0b3
BLAKE2b-256 603da9d4b009cdae6c44d74298622d476e565858b10412e1754d13b14b956be2

See more details on using hashes here.

File details

Details for the file trainproof-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: trainproof-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for trainproof-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4491a97361971bcd70327c4029528aba3542a7c17e7cfdbbd20622398ee45379
MD5 a4eaed633383010692c883ac34523f1b
BLAKE2b-256 ee9c2f28d9266f95152c8849452466352ed9a5106cc24b51325a46481997ec85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page