You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[#533](https://github.com/gradio-app/trackio/pull/533)[`08bc5eb`](https://github.com/gradio-app/trackio/commit/08bc5eb090525d3ff5f7fa4233c30c42162aa74c) - Fix Windows-only emoji mojibake when uploading Space README. Thanks @tomaarsen!
14
+
-[#518](https://github.com/gradio-app/trackio/pull/518)[`e7ed176`](https://github.com/gradio-app/trackio/commit/e7ed176da53d8b49290fddd890b3d18c0b9b958f) - Traces in Trackio. Thanks @abidlabs!
15
+
-[#531](https://github.com/gradio-app/trackio/pull/531)[`27a50a3`](https://github.com/gradio-app/trackio/commit/27a50a37362020304b774344b4c774ff548985b6) - Add configurable custom frontends for Trackio. Thanks @abidlabs!
16
+
17
+
## 0.24.2
18
+
19
+
### Features
20
+
21
+
-[#527](https://github.com/gradio-app/trackio/pull/527)[`7d1c0b9`](https://github.com/gradio-app/trackio/commit/7d1c0b9c37ce9a9845e6bbe6c083da9d36084caf) - Fix dashboard UX issues: smoothing in share URL, run selection, and run filtering. Thanks @abidlabs!
22
+
-[#526](https://github.com/gradio-app/trackio/pull/526)[`643878a`](https://github.com/gradio-app/trackio/commit/643878a82985fab9e6675f769ff0107cb46e042a) - Add emoji to README and deploy README content. Thanks @qgallouedec!
The directory only needs an `index.html` file. Trackio keeps serving the same backend API under `/api/*`, so you can replace the UI without forking the backend. If the directory is missing or invalid, Trackio falls back to a minimal starter template.
162
+
163
+
To make a custom frontend apply everywhere by default:
164
+
165
+
```bash
166
+
trackio config set frontend ./my-trackio-frontend
167
+
```
168
+
169
+
Reset it with:
170
+
171
+
```bash
172
+
trackio config unset frontend
173
+
```
174
+
149
175
## Deploying to Hugging Face Spaces
150
176
151
177
When calling `trackio.init()`, by default the service will run locally and store project data on the local machine.
@@ -183,10 +209,16 @@ If you've been tracking experiments locally and want to move them to Hugging Fac
This uploads your local project database to a new or existing Space. The Space will display all your logged experiments and metrics.
219
+
This uploads your local project database to a new or existing Space. The Space will display all your logged experiments and metrics, and if a custom frontend is configured or passed explicitly it will be deployed there too.
220
+
221
+
Static Trackio Spaces (`sdk="static"`) are read-only browser-only snapshots, so their snapshot data must be public. Use the default Gradio Space for private dashboards; `sdk="static"` does not support `private=True`.
Static Spaces serve data directly from the browser and therefore require public snapshot data. `--sdk static --private` is not supported; use the default Gradio SDK for private dashboards.
43
+
42
44
Sync all projects that have unsynced data to their configured Spaces:
43
45
44
46
```sh
@@ -51,7 +53,7 @@ trackio sync --all
51
53
|`--space-id`| The HF Space ID to sync to (e.g. `username/space_id`). If not provided, uses the previously-configured Space |
52
54
|`--all`| Sync all projects with unsynced data |
53
55
|`--sdk`|`gradio` (default) for a live server, or `static` for a read-only bucket-backed Space |
54
-
|`--private`| Make the Space private if creating a new one|
56
+
|`--private`| Make the Space private if creating a new Gradio Space. Not supported with `--sdk static`|
55
57
|`--force`| Overwrite the existing database without prompting |
|`--space-id`| The source Gradio Space ID (required) |
74
76
|`--project`| The project to freeze (required) |
75
77
|`--new-space-id`| The destination static Space ID. Defaults to `{space_id}_static`|
76
-
|`--private`|Make the new static Space private|
78
+
|`--private`|Not supported for static frozen snapshots|
77
79
78
80
> **Note:** The source must be a Gradio Space with a bucket mounted at `/data`. If the destination Space already exists and is not a Trackio static Space, `freeze` will refuse to overwrite it.
79
81
> The frozen Space is a snapshot. Later metrics synced to the original Gradio Space do not appear in the frozen static Space unless you run `freeze` again.
82
+
> Static frozen snapshots require public destination data, so `trackio freeze --private` is not supported.
Static Spaces are lightweight and free — they serve a read-only dashboard backed by Parquet files in an HF Bucket.
45
+
Static Spaces are lightweight and free — they serve a read-only dashboard backed by Parquet files in an HF Bucket. Because the dashboard runs entirely in the browser, static Trackio Spaces require public snapshot data and do not support `private=True`. Use the default Gradio Space (`sdk="gradio"`) for private dashboards.
This creates a new static Space (by default named `{space_id}_static`) containing a snapshot of the project's data from the source Space's bucket. The original Space is not modified.
62
62
63
63
Note that`freeze()` is a one-time snapshot. If new metrics are later uploaded to the original Gradio Space, the frozen static Space will not update automatically.
64
+
The source Gradio Space can use a private bucket, but the frozen static snapshot is public data. `freeze(private=True)` is not supported; use a Gradio Space if the frozen dashboard must stay private.
The dashboard **write token** for a self-hosted Trackio server (same value as the `write_token` query parameter in the write-access URL). Use this when `TRACKIO_SERVER_URL` or `server_url` is a base URL without query parameters. The client sends this token on each request (for example as the `X-Trackio-Write-Token` header) so metric ingestion and uploads are authenticated when not running on Hugging Face Spaces.
33
33
34
+
### `TRACKIO_FRONTEND_DIR`
35
+
36
+
Path to a custom static frontend directory for Trackio. The directory must contain `index.html`.
37
+
38
+
When set, Trackio uses that frontend for `trackio.show()` and for deploy flows such as `trackio.sync()` and `trackio.freeze()`, unless an explicit `frontend_dir` / `--frontend` argument is passed.
If the configured directory is invalid, Trackio ignores it and falls back to the built-in frontend selection logic. The automatic starter-template copy behavior only applies when an explicit `frontend_dir` / `--frontend` argument points to a missing or empty directory.
45
+
34
46
### `TRACKIO_LOGO_LIGHT_URL` and `TRACKIO_LOGO_DARK_URL`
35
47
36
48
Customize the logos displayed in the Trackio dashboard for light and dark themes. You can provide URLs to custom logos. Note that both environment variables should be supplied; otherwise, the Trackio default will be used for any variable that is not provided.
You can change the theme of the dashboard by providing an optional `theme` argument.
49
+
## Using a Custom Frontend
50
+
51
+
You can replace the bundled dashboard with your own static frontend directory. The directory only needs an `index.html` file; your frontend can call the existing Trackio API under `/api/*`.
52
+
53
+
The intended workflow is:
54
+
55
+
1. Run `trackio show --frontend ./my-trackio-frontend`.
56
+
2. Ask your LLM to edit the files in that directory.
57
+
3. Keep the browser open while Trackio live reloads the frontend as those files change.
58
+
59
+
If the directory passed to `--frontend` does not exist, or exists but is empty, Trackio copies in the starter frontend automatically, prints that it did so, and then serves that directory. The starter is a complete plain-HTML/CSS/JS template: it calls the Trackio API, loads projects and runs, fetches metric values, and draws simple charts that you can replace with your own UI.
60
+
61
+
The currently available HTTP endpoints are:
62
+
63
+
-`POST /api/get_run_mutation_status`
64
+
-`POST /api/upload_db_to_space`
65
+
-`POST /api/bulk_upload_media`
66
+
-`POST /api/log`
67
+
-`POST /api/bulk_log`
68
+
-`POST /api/bulk_log_system`
69
+
-`POST /api/bulk_alert`
70
+
-`POST /api/get_alerts`
71
+
-`POST /api/get_metric_values`
72
+
-`POST /api/get_runs_for_project`
73
+
-`POST /api/get_metrics_for_run`
74
+
-`POST /api/get_all_projects`
75
+
-`POST /api/get_project_summary`
76
+
-`POST /api/get_run_summary`
77
+
-`POST /api/get_system_metrics_for_run`
78
+
-`POST /api/get_system_logs`
79
+
-`POST /api/get_system_logs_batch`
80
+
-`POST /api/get_snapshot`
81
+
-`POST /api/get_logs`
82
+
-`POST /api/get_logs_batch`
83
+
-`POST /api/get_traces`
84
+
-`POST /api/query_project`
85
+
-`POST /api/get_settings`
86
+
-`POST /api/get_project_files`
87
+
-`POST /api/delete_run`
88
+
-`POST /api/rename_run`
89
+
-`POST /api/force_sync`
90
+
-`POST /api/upload` for multipart file uploads used by media and file-related flows
91
+
92
+
For reading stored files returned by the API, Trackio also serves `GET /file?path=...`.
To see the available themes, check out the [themes gallery](https://huggingface.co/spaces/gradio/theme-gallery).
113
+
If the provided frontend directory is non-empty but invalid, Trackio falls back to the shipped starter template.
114
+
115
+
## Setting a Persistent Default Frontend
116
+
117
+
If you want the same custom frontend to be used by `trackio show`, `trackio sync`, and deploy flows by default, save it in Trackio's persistent config:
Trackio integrates natively with [TRL](https://github.com/huggingface/trl) so you can log metrics from any TRL trainer (`SFTTrainer`, `DPOTrainer`, `GRPOTrainer`, etc.) with minimal setup. Ensure you have the latest version of `trl` installed (version 1.2.0 or higher).
4
+
5
+
```python
6
+
from datasets import Dataset
7
+
from trl import SFTConfig, SFTTrainer
8
+
9
+
# Create a small fake dataset
10
+
prompts = ["The capital of France is", "Hamlet was written by"] *12
0 commit comments