Skip to content

feat(studio): surface experiment metadata as dynamic columns - #412

Merged
walston merged 3 commits into
mainfrom
nwalston/dynamic-metadata-columns
Jun 23, 2026
Merged

feat(studio): surface experiment metadata as dynamic columns#412
walston merged 3 commits into
mainfrom
nwalston/dynamic-metadata-columns

Conversation

@walston

@walston walston commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Closes #ASE-286

Screen.Recording.2026-06-23.at.11.16.09.mov

Summary

Experiments carry free-form metadata (producer-supplied key/value pairs) but there was no way to compare them side-by-side in the experiments table. This adds dynamic metadata columns that mirror the existing evaluator-score column pattern: a useMemo computes the union of metadata keys across the loaded page, sorts them alphabetically, and maps each into a column accessor inserted after the Models column.

Keys are normalized to lowercase when building the union so case variants (e.g. status and Status from different producers) collapse into one column instead of producing duplicate headers. The accessor finds the first key that lowercases to a match, so values are still retrieved correctly regardless of producer casing. All metadata columns flow through the existing EditColumnsMenu so users can hide noisy keys. Cell rendering handles every value type: null/undefined-, objects/arrays → JSON.stringify, primitives → String(). Values over 50 characters truncate with a tooltip showing the full string.

Test plan

  • Open test-group-experiment-medadata in Studio
  • Confirm metadata columns appear between Models and Avg Cost, sorted alphabetically
  • missing-key-b row shows - in the Environment column (key absent)
  • object-value row shows stringified JSON in the Config column
  • long-value row truncates Job Name at 50 chars with a tooltip containing the full string
  • primitives row shows 3 and false for Retries and Cached (not -)
  • no-metadata row renders without crashing; no extra columns from that row
  • case-variant-lower and case-variant-upper share a single Status column showing passing and FAILING
  • Metadata columns are hideable via the Columns menu
  • Navigating to page 2 recomputes the column set to match that page's rows

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Experiment metadata is now shown as dynamic table columns in the data view, generated from the loaded rows’ keys
    • Missing or null metadata values display as -
    • Long metadata values are truncated with hover tooltips to reveal the full content

walston added 2 commits June 23, 2026 11:00
Union of metadata keys across loaded rows, sorted alphabetically,
inserted after the Models column. Each key becomes a hideable column
via the existing EditColumnsMenu. Cell rendering: null/undefined → '-',
object/array → JSON.stringify, primitives → String(). Values over 50
chars truncate with a tooltip showing the full string.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
'status' and 'Status' now produce a single column instead of two
identically-labelled headers. The accessor finds the first key that
lowercases to a match, so the value is still retrieved correctly
regardless of how the producer cased the key.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
@walston
walston requested review from a team as code owners June 23, 2026 18:12
@github-actions github-actions Bot added the feat label Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3438d448-f7b3-4095-b1a4-b81c34d0630d

📥 Commits

Reviewing files that changed from the base of the PR and between b727694 and fb61b4d.

📒 Files selected for processing (1)
  • web/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx

📝 Walkthrough

Walkthrough

ExperimentGroupDataView now extracts a sorted, deduplicated set of lowercased metadata keys from loaded rows and generates one table column per key. Cells render - for nulls, JSON.stringify for objects, plain strings otherwise, truncated at 50 chars with a full-value tooltip. The makeColumns dependency array gains metadataKeys.

Changes

Dynamic metadata columns in ExperimentGroupDataView

Layer / File(s) Summary
Metadata key extraction, column generation, and dependency wiring
web/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx
metadataKeys memo builds a sorted, deduped lowercase key list from tableData. Dynamic columns use case-insensitive key lookup, null/object/string rendering with 50-char truncation and tooltip, and metadataKeys is added to the makeColumns dependency array.

Suggested reviewers

  • shanaiabuggy
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title clearly and specifically describes the main change: adding dynamic metadata columns to experiments table.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nwalston/dynamic-metadata-columns

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 21176/27762 76.3% 61.2%
Integration Tests 12216/26531 46.0% 19.5%

@walston
walston added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit 95b728e Jun 23, 2026
53 checks passed
@walston
walston deleted the nwalston/dynamic-metadata-columns branch June 23, 2026 22:16
crookedstorm pushed a commit that referenced this pull request Jun 24, 2026
* feat: surface experiment metadata as dynamic columns

Union of metadata keys across loaded rows, sorted alphabetically,
inserted after the Models column. Each key becomes a hideable column
via the existing EditColumnsMenu. Cell rendering: null/undefined → '-',
object/array → JSON.stringify, primitives → String(). Values over 50
chars truncate with a tooltip showing the full string.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>

* fix: normalize metadata keys to lowercase to collapse case variants

'status' and 'Status' now produce a single column instead of two
identically-labelled headers. The accessor finds the first key that
lowercases to a match, so the value is still retrieved correctly
regardless of how the producer cased the key.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>

* style: fix prettier formatting in ExperimentGroupDataView

Signed-off-by: Nathan Walston <nwalston@nvidia.com>

---------

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
steramae-nvidia pushed a commit that referenced this pull request Jun 25, 2026
* feat: surface experiment metadata as dynamic columns

Union of metadata keys across loaded rows, sorted alphabetically,
inserted after the Models column. Each key becomes a hideable column
via the existing EditColumnsMenu. Cell rendering: null/undefined → '-',
object/array → JSON.stringify, primitives → String(). Values over 50
chars truncate with a tooltip showing the full string.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>

* fix: normalize metadata keys to lowercase to collapse case variants

'status' and 'Status' now produce a single column instead of two
identically-labelled headers. The accessor finds the first key that
lowercases to a match, so the value is still retrieved correctly
regardless of how the producer cased the key.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>

* style: fix prettier formatting in ExperimentGroupDataView

Signed-off-by: Nathan Walston <nwalston@nvidia.com>

---------

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants