Skip to main content

TrainTrack Client: PyTorch training-time evaluation

Project description

TrainTrack

Training-time evaluation and win-rate tracking for LLMs.

TrainTrack helps you monitor model behavior during training by running automated LLM-as-a-Judge evaluations on every checkpoint.

Features

  • 🚀 Real-time Metrics: Get immediate feedback on conciseness, helpfulness, and reasoning quality.
  • 📊 Win-rate Tracking: Automatically track win-rates against an anchor checkpoint (baseline) or the previous step.
  • 📚 Built-in Benchmarks: Integrated support for GPQA, MMLU-Pro, IFEval, and TruthfulQA.
  • 🛠️ Seamless Integration: Works with standard PyTorch loops and HuggingFace Trainer.

Quick Installation

pip install traintrack-ai

Minimal Example

from traintrack import TrainTrackHook

# 1. Initialize the hook
hook = TrainTrackHook(
    model=model,
    tokenizer=tokenizer,
    run_name="my-first-run",
    datasets=["reasoning", "helpfulness"]
)

# 2. Capture a baseline (optional)
hook.capture_anchor()

# 3. Add to your training loop
for step, batch in enumerate(train_dataloader):
    # ... training logic ...

    hook.step(step)

Documentation

For full documentation and advanced configuration (custom metrics, rubrics, and category-based evaluation), visit: github.com/traintrack/traintrack

Tinker Integration

TrainTrack includes a Tinker inline evaluator integration that can be used with evaluator_builders:

from traintrack import BuildTrainTrackTinkerEvaluator

traintrack_builder = BuildTrainTrackTinkerEvaluator(
    run_name="my-tinker-run",
    categories=["reasoning", "helpfulness"],
    model_name="Qwen/Qwen2.5-1.5B-Instruct",
    eval_every_steps=10,
)

# Add `traintrack_builder` to your Tinker `evaluator_builders` list.

If you're using a low-level custom training loop, call: evaluator.evaluate_training_step(training_client=..., step=...) to let TrainTrack handle scheduling + snapshot + sampling + ingest.

For a runnable single-eval smoke test, see: Canary/examples/tinker_sampling_evaluator_example.py

For low blocking overhead during training, wire a small frequent evaluator into evaluator_builders and larger suites into infrequent_evaluator_builders.

For a full training run example (real training + eval every N steps), see: Canary/examples/tinker_supervised_traintrack_training.py

For a low-level Tinker quickstart-style example (Pig Latin with manual forward/backward updates + TrainTrack eval every N steps), see: Canary/examples/tinker_pig_latin_with_traintrack.py

For a real NoRobots finetune with TrainTrack evaluation on the NoRobots test set (helpfulness metric, criteria + pairwise_anchor), see: Canary/examples/tinker_norobots_traintrack_finetune.py

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

traintrack_ai-0.1.6.tar.gz (482.3 kB view details)

Uploaded Source

Built Distribution

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

traintrack_ai-0.1.6-py3-none-any.whl (527.6 kB view details)

Uploaded Python 3

File details

Details for the file traintrack_ai-0.1.6.tar.gz.

File metadata

  • Download URL: traintrack_ai-0.1.6.tar.gz
  • Upload date:
  • Size: 482.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for traintrack_ai-0.1.6.tar.gz
Algorithm Hash digest
SHA256 703665ab35d556e760a48e6882a282dc40f0882761b9e28a9ae2f9d7c12d7fe8
MD5 bf61cfab0667b04fe203382e77e30976
BLAKE2b-256 18d3ac7153bef57a1acc5e2dd90951f2cbc80fdc69d27bd1a21927076845cc4c

See more details on using hashes here.

File details

Details for the file traintrack_ai-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: traintrack_ai-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 527.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for traintrack_ai-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 60cca4cee27122eea644a46b17d6bb9fe3b8d0a34a435fd74cc701bd265f6ad4
MD5 2cace98a00324c3dfcd0f89e2b554618
BLAKE2b-256 711684f0ebfb57eff5adcd65337ab3f6878196c0c2054cfbd5544a53bce35761

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