tviz is a visualization dashboard for the Tinker API
Project description
tviz
tviz is a local dashboard for visualizing RL training runs. 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
pip install tviz
Usage
from tviz import TvizLogger
logger = TvizLogger(run_name="math_rl")
logger.log_hparams(config)
for step in range(1000):
logger.log_metrics({"reward": 0.5, "loss": 0.1}, step=step)
logger.log_rollouts(rollouts, step=step)
logger.close()
With Tinker Cookbook
from tinker_cookbook.utils.ml_log import setup_logging
from tviz import TvizLogger
from tviz.adapters.tinker import from_tinker_batch
# Add TvizLogger to the multiplex logger
ml_logger = setup_logging(log_dir, wandb_project="my_project", config=config)
tviz_logger = TvizLogger(run_name="math_rl")
ml_logger.loggers.append(tviz_logger)
# In training loop - after rollouts:
rollouts = from_tinker_batch(trajectory_groups_P, tokenizer=tokenizer)
tviz_logger.log_rollouts(rollouts, step=i_batch)
# Metrics are logged automatically via multiplex
ml_logger.log_metrics(metrics, step=i_batch)
Dashboard
cd tviz && bun install && bun dev
Open http://localhost:3003 to view training runs.
By default, tviz stores data in ~/.tviz/tviz.db. You can override this
with TVIZ_DB_PATH.
Modalities
- text: LLM RL (math_rl, code_rl, chat_sl)
- vision: VLM tasks with images and maps
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tviz-0.2.1.tar.gz.
File metadata
- Download URL: tviz-0.2.1.tar.gz
- Upload date:
- Size: 74.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e579947ce7363c0f15eacca681daf60bdc3dc5ed26a3b3af970a88e457b9869
|
|
| MD5 |
f522682d937a2d5c555e544a6934b8b3
|
|
| BLAKE2b-256 |
e7ac5546c085fff41c0b07b98b50c07a6c273607ca3806663a92f4b22e1cb0ff
|
File details
Details for the file tviz-0.2.1-py3-none-any.whl.
File metadata
- Download URL: tviz-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8162f48cc290e1fc46af843106bae45c138c5bac7d2717b23a67b53b4dd1107
|
|
| MD5 |
415f09e222a5e82f34aa4deaed83bb48
|
|
| BLAKE2b-256 |
a656043e27f17843fbbe125f0ee6df27f604f2c2886bce6adf6c0116ae042e8e
|