Skip to content

Add remote HF Space support to CLI#445

Merged
abidlabs merged 9 commits into
mainfrom
docs-remote-space-cli
Mar 9, 2026
Merged

Add remote HF Space support to CLI#445
abidlabs merged 9 commits into
mainfrom
docs-remote-space-cli

Conversation

@abidlabs
Copy link
Copy Markdown
Member

@abidlabs abidlabs commented Mar 5, 2026

Summary

  • Add --space flag to all list and get CLI commands, allowing users to query a remote HF Space by ID (user/space) or URL (https://user-space.hf.space)
  • Add --hf-token flag for private Space access
  • Add trackio/remote_client.py — thin wrapper around gradio_client.Client with error handling
  • Add 4 missing read API endpoints to the Gradio UI (get_system_metrics_for_run, get_system_logs, get_snapshot, get_logs) and extend get_metric_values with optional filtering params
  • Update CLI docs (docs/source/cli_commands.md) and agent skills (.agents/skills/trackio/) with remote Space usage
  • Add e2e test (tests/e2e-spaces/test_cli_remote.py)

Examples:

List projects on a remote Space

$ trackio list projects --space abidlabs/nanogpt-experiments

Projects
========
  nanogpt
  gpt2-finetune

List runs (JSON output)

$ trackio list runs --project nanogpt --space abidlabs/nanogpt-experiments --json
{"project": "nanogpt", "runs": ["run-1", "run-2", "run-3"]}

Get metric values

$ trackio get metric --project nanogpt --run run-1 --metric loss --space abidlabs/nanogpt-experiments

Step   Timestamp                  Value
-----  -------------------------  -----
0      2025-06-01T12:00:00        0.5
1      2025-06-01T12:00:05        0.42
2      2025-06-01T12:00:10        0.35

abidlabs and others added 2 commits March 5, 2026 11:49
Allow all `list` and `get` CLI commands to query a remote HF Space
instead of local data by passing `--space <space_id_or_url>`.

- Add `trackio/remote_client.py` wrapping gradio_client for remote calls
- Add `--space` and `--hf-token` flags to CLI
- Add missing read API endpoints to UI (system metrics, snapshot, logs)
- Extend `get_metric_values` endpoint with optional filtering params
- Update CLI docs and agent skills with remote Space usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gradio-pr-bot
Copy link
Copy Markdown
Contributor

gradio-pr-bot commented Mar 5, 2026

🪼 branch checks and previews

Name Status URL
🦄 Changes detected! Details

@gradio-pr-bot
Copy link
Copy Markdown
Contributor

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
trackio minor

  • Add remote HF Space support to CLI

‼️ Changeset not approved. Ensure the version bump is appropriate for all packages before approving.

  • Maintainers can approve the changeset by checking this checkbox.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@abidlabs
Copy link
Copy Markdown
Member Author

abidlabs commented Mar 9, 2026

Going to merge this in as it's just CLI changes

@abidlabs abidlabs merged commit cef4a58 into main Mar 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants