Deploying and Embedding Dashboards

Deploying to Hugging Face Spaces

When calling init(), by default the service will run locally and store project data on the local machine.

But if you pass a space_id to init(), like:

trackio.init(project="my-project", space_id="orgname/space_id")

or

trackio.init(project="my-project", space_id="username/space_id")

it will use an existing or automatically deploy a new Hugging Face Space as needed. You should be logged in with the huggingface-cli locally and your token should have write permissions to create the Space.

Embedding a Trackio Dashboard

One of the reasons we created trackio was to make it easy to embed live dashboards on websites, blog posts, or anywhere else you can embed a website.

image

If your Trackio dashboard is hosted on Spaces, you can embed it anywhere using an <iframe>:

<iframe src="https://username-space_id.hf.space"></iframe>

You can also filter the dashboard to display only specific projects or metrics using query parameters. Supported parameters include:

You can customize your <iframe> using standard attributes such as width, height, and style. For more details, see MDN Web Docs: <iframe>. For example:

<iframe 
    src="https://trackio-documentation.hf.space/?project=my-project&metrics=train_loss,train_accuracy&sidebar=hidden" 
    width="600" 
    height="630" 
    style="border:0;">
</iframe>
Update on GitHub