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
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,14 @@ 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.
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:
0 commit comments