Skip to content

feature: add "group by" dropdown to sidebar#551

Merged
abidlabs merged 19 commits into
mainfrom
feature/run-grouping
May 21, 2026
Merged

feature: add "group by" dropdown to sidebar#551
abidlabs merged 19 commits into
mainfrom
feature/run-grouping

Conversation

@Saba9

@Saba9 Saba9 commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Short Description

trackio-grouping

This PR adds support for grouping runs by config fields in the sidebar.

Users can select any run config key from a Group by dropdown. Runs are then displayed in labeled sections with select-all checkboxes per group.

Two reserved keys are promoted to the top of the dropdown:

  • _Group — set via wandb.init(group=...), displayed as Group
  • _Username — displayed as Username

These reserved keys only appear when they have at least two distinct values across runs. Config keys prefixed with _ that are not explicitly promoted are hidden from the dropdown.

AI Disclosure

I used AI to write the code on this branch.

Type of Change

  • New feature, non-breaking

Related Issues

Closes:

Testing and Linting

  • Added two integration tests for the /get_run_configs endpoint:
    • test_get_run_configs_returns_config_per_run
    • test_get_run_configs_returns_empty_for_unknown_project
  • Added Vitest unit tests for grouping.js, covering:
    • Option computation
    • Key promotion and hiding
    • Variance filtering
    • Run bucketing
  • Confirmed pytest passes
  • Applied:
    • ruff check --fix --select I
    • ruff format

@gradio-pr-bot

gradio-pr-bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

🪼 branch checks and previews

Name Status URL
🦄 Changes detected! Details

@gradio-pr-bot

gradio-pr-bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
trackio minor

  • add "group by" dropdown to sidebar

‼️ 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

HuggingFaceDocBuilderDev commented May 18, 2026

Copy link
Copy Markdown

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview

Install Trackio from this PR (includes built frontend)

pip install "https://huggingface.co/buckets/trackio/trackio-wheels/resolve/0496da6bca1d32bf9aa83d95c8927f0f18997d99/trackio-0.25.1-py3-none-any.whl"

@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.

@Saba9 Saba9 changed the title Feature/run grouping add "group by" dropdown to sidebar May 18, 2026
@Saba9 Saba9 changed the title add "group by" dropdown to sidebar feature: add "group by" dropdown to sidebar May 19, 2026
@Saba9 Saba9 marked this pull request as ready for review May 19, 2026 00:12
@Saba9 Saba9 requested review from abidlabs and znation May 19, 2026 00:12
@abidlabs abidlabs requested a review from Copilot May 19, 2026 00:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds sidebar support for grouping runs by config fields, backed by a new run-config API and static-mode config loading.

Changes:

  • Adds /get_run_configs server/API support and static frontend equivalent.
  • Adds grouping utility logic and unit tests for option computation and bucketing.
  • Updates the sidebar to render a “Group by” dropdown with per-group run selection.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
trackio/sqlite_storage.py Returns all stored run configs keyed by run ID when available.
trackio/server.py Exposes get_run_configs through the API registry.
trackio/frontend/src/lib/api.js Adds frontend API wrapper for run configs.
trackio/frontend/src/lib/staticApi.js Adds static-mode config extraction from exported config parquet data.
trackio/frontend/src/lib/grouping.js Adds config grouping option and bucketing helpers.
trackio/frontend/src/lib/grouping.test.js Adds Vitest coverage for grouping helper behavior.
trackio/frontend/src/components/Sidebar.svelte Adds the grouping dropdown and grouped run checkbox UI.
trackio/frontend/src/App.svelte Fetches run configs and passes them to the sidebar.
tests/unit/test_local_server_api.py Adds API integration tests for run config retrieval.
.changeset/loose-loops-obey.md Adds a minor-version changeset for the feature.
Comments suppressed due to low confidence (1)

trackio/frontend/src/App.svelte:152

  • refreshRuns() is called by the app poller every 1s (2.5s on Spaces), so this now downloads every run's full config on each poll even though configs usually change only when runs are created. For projects with many runs or large configs this can add significant recurring API/JSON overhead; consider fetching configs only when the selected project or run list changes, or add a lighter incremental/cache-aware endpoint.
      const [data, configs] = await Promise.all([
        getRunsForProject(selectedProject),
        getRunConfigs(selectedProject).catch(() => null),
      ]);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread trackio/frontend/src/App.svelte
Comment thread .changeset/loose-loops-obey.md Outdated
Comment thread trackio/frontend/src/lib/grouping.js Outdated
Comment thread trackio/frontend/src/lib/grouping.js Outdated
@Saba9 Saba9 marked this pull request as draft May 19, 2026 02:09
Saba9 and others added 4 commits May 18, 2026 19:10
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Saba9 Saba9 marked this pull request as ready for review May 20, 2026 21:47
@abidlabs

Copy link
Copy Markdown
Member

Works beautifully @Saba9, LGTM!

@abidlabs abidlabs merged commit 0ef7266 into main May 21, 2026
8 of 9 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.

6 participants