Skip to content
/ tviz Public

tviz is a visualization dashboard for the Tinker API

Notifications You must be signed in to change notification settings

sdan/tviz

Repository files navigation

tviz

tviz dashboard

tviz is a local dashboard for visualizing RL training runs with Tinker. Similar to wandb, you add a logger to your training loop. Metrics, rollouts, and trajectories are stored in a local SQLite database and displayed in real-time.

Installation

  1. Install the Python client via pip install tviz
  2. Clone and run the dashboard:
git clone https://github.com/sdan/tviz.git
cd tviz && bun install && bun dev
  1. Open http://localhost:3003 to view your runs.

Data is stored in ./data/tviz.db by default. Override with TVIZ_DB_PATH.

Usage

from tviz import TvizLogger
from tviz.adapters.tinker import from_tinker_batch

logger = TvizLogger(run_name="gsm8k_grpo")
logger.log_hparams({"model": "llama-3.2-1b", "lr": 1e-4})

for step in range(100):
    # Your Tinker training loop
    trajectory_groups = rollout(...)

    # Log to tviz
    rollouts = from_tinker_batch(trajectory_groups, tokenizer=tokenizer)
    logger.log_rollouts(rollouts, step=step)
    logger.log_metrics({"reward": avg_reward, "loss": loss}, step=step)

logger.close()

Examples

We include several examples in the examples/ folder:

  1. Quickstart: Pig Latin SFT with minimal tviz integration.
  2. GSM8K RL: Math reasoning with GRPO.
  3. RL Loop: Generic RL loop with rollout logging.

To run an example:

export TINKER_API_KEY=your-api-key
python examples/quickstart.py

Documentation

For the full API reference and guides, visit tviz.sdan.io/docs.

License

MIT

About

tviz is a visualization dashboard for the Tinker API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •