Skip to content

feat(studio): agent eval fileset descriptions, reusable eval configs#657

Merged
nv-odrulea merged 2 commits into
mainfrom
reusable-eval-configs/odrulea
Jul 14, 2026
Merged

feat(studio): agent eval fileset descriptions, reusable eval configs#657
nv-odrulea merged 2 commits into
mainfrom
reusable-eval-configs/odrulea

Conversation

@nv-odrulea

@nv-odrulea nv-odrulea commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Agent Eval: create new config from example

Screenshot 2026-07-13 at 1 06 08 PM

Agent Eval: create new config from existing fileset

Screenshot 2026-07-13 at 1 06 17 PM

Agent Eval: reuse existing agent eval config

Screenshot 2026-07-13 at 1 05 57 PM

Agent Eval: the 3 Filesets that are created, 2 now have descriptions

Screenshot 2026-07-13 at 1 10 15 PM

Run Agent Evaluation modal (SubmitEvaluationModal.tsx, new submitEvaluationSpec.ts)

  • New Eval Config dropdown: reuse an existing config (derived from the agent's prior
    eval jobs) or Create new eval config. Preselects the latest config for the selected
    agent.
  • The Eval Config subsection only appears once an agent is selected (auto-selected when
    opened from the agent side panel).
  • Segmented control Use Example / Choose Fileset (replaces the radio group).
  • Use Example: pre-fills a suggested adjective-animal fileset name
    (generateEvalConfigName), editable ("New Fileset Name").
  • Choose Fileset: fileset picker filtered to purpose=generic, labelled "Fileset",
    auto-selects the first root-level .yml/.yaml so you don't have to drill in.
  • Spec-building extracted to a pure, unit-tested module (buildSubmitSpec,
    evaluateRequestBody, generateOutputFilesetName, evalOutputDescription).

Fileset descriptions (no plugin change)

  • Output fileset: Studio now pre-creates the per-run output fileset with a description
    Agent Evaluation output, agent: <agent>, config: <config-fileset>. The job's
    fileset_auto_create no-ops on existence, so the description sticks. Best-effort (never
    blocks submission).
  • Eval config fileset: created with description Agent Evaluation Config (via
    ensureEvalConfigFileset, only when Studio actually creates it).

Output layout (sample-agents/email-phishing-analyzer/eval.yml)

  • output_dir: eval/agentoutput_dir: . so eval artifacts land at the output fileset
    root instead of a nested eval/agent/ subfolder.

Filesets list (DatasetsTable/columns.tsx)

  • Name and Path columns now wrap to multiple lines instead of truncating.

Shared UploadModal / file picker (packages/common/.../UploadModal,
DatasetFileSelect)

  • Added opt-in props threaded through the picker: filesetPurpose, datasetLabel,
    autoSelectFirstAcceptable. All default to today's behavior (backward compatible).
  • SimpleFilesTable: Name column now fills the row width while Size stays a fixed 120px
    (fixes a width-distribution issue in the virtualized table); the "only .yml/.yaml can
    be selected" hint is suppressed once a valid file is selected. Still virtualized.

List route CTA (AgentEvaluationsListRoute.tsx)

  • "New evaluation" → "Run Evaluation" (brand-green primary button).

Out of scope / not in this PR

  • No plugins/nemo-agents changes.
  • Output nesting under the eval-config fileset (dropped — needs a plugin change).
  • Internal job-fileset-* clutter in the Filesets list (tracked separately).

Summary by CodeRabbit

  • New Features
    • Enhanced upload flow with purpose-specific file filtering, configurable dataset labeling, and an option to automatically select the first acceptable root-level file.
    • Improved agent evaluation setup with smarter eval-config selection/creation and automatic preparation of run output.
    • Changed the evaluation action button to “Run Evaluation”.
  • Bug Fixes
    • Selection warning now only shows when no valid (allowed) file is selected.
  • UI Improvements
    • Dataset names/paths now wrap instead of truncating.
    • File table columns now use more consistent sizing.

@nv-odrulea nv-odrulea requested review from a team as code owners July 13, 2026 20:02
@github-actions github-actions Bot added the feat label Jul 13, 2026
@nv-odrulea nv-odrulea force-pushed the reusable-eval-configs/odrulea branch from ceea36c to 07fd566 Compare July 13, 2026 20:05
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Fileset picker configuration

Layer / File(s) Summary
Picker configuration contracts and propagation
web/packages/common/src/components/DatasetFileSelect/*, web/packages/common/src/components/UploadModal/{types.ts,Context/*,InlineUploadPicker.tsx}
Fileset purpose, dataset label, and automatic-selection options are added to picker props, upload-modal state, and provider initialization.
Contextual fileset selection and auto-selection
web/packages/common/src/components/UploadModal/DatasetUploader/Select*
Fileset queries use the configured purpose, labels become dynamic, and the first acceptable root-level file can be selected automatically.
File table selection feedback and sizing
web/packages/common/src/components/UploadModal/SimpleFilesTable.tsx
Unsupported-file messaging is suppressed when a valid file is selected, and table column widths are constrained.

Agent evaluation submission

Layer / File(s) Summary
Evaluation submission specification
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec*
Shared types, spec construction, seed-source handling, output naming, request mapping, and tests are added.
Evaluation modal workflow
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx
The modal loads prior evaluation configurations, supports reuse or creation from examples/filesets, provisions output filesets, and submits the shared request specification.
Evaluation fileset metadata and entrypoint labels
web/packages/studio/src/routes/agents/AgentSuggestionsRoute/api.ts, web/packages/studio/public/sample-agents/*/eval.yml, web/packages/studio/src/routes/agents/AgentEvaluationsRoute/*
Eval-config creation accepts descriptions, the sample output directory changes, and the route action is renamed to “Run Evaluation.”

Studio dataset display

Layer / File(s) Summary
Wrapped dataset name and path cells
web/packages/studio/src/components/DatasetsTable/columns.tsx
Dataset names and paths wrap across lines instead of being truncated; path tooltips remain available.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SubmitEvaluationModal
  participant EvaluationJobs
  participant FilesetAPI
  participant EvaluateAPI
  User->>SubmitEvaluationModal: select agent and evaluation configuration
  SubmitEvaluationModal->>EvaluationJobs: fetch prior evaluation jobs
  EvaluationJobs-->>SubmitEvaluationModal: return existing configurations
  SubmitEvaluationModal->>FilesetAPI: create or seed configuration fileset
  SubmitEvaluationModal->>FilesetAPI: create output fileset
  SubmitEvaluationModal->>EvaluateAPI: submit evaluation request
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: reusable agent eval configs and fileset descriptions in Studio.
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.
✨ 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 reusable-eval-configs/odrulea

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

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx (1)

61-97: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Guard against stale dataset fetches. If the user switches datasets before filesListFilesetFiles returns, the older response can still overwrite the newer selection’s SET_FILES/TOGGLE_FILE_SELECTION state. Track the active request or bail out when the selected dataset no longer matches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx`
around lines 61 - 97, Update handleDatasetSelect to guard the asynchronous
filesListFilesetFiles response against stale dataset selections: track the
active request or verify that the current selected dataset still matches fileset
before dispatching SET_FILES or TOGGLE_FILE_SELECTION. Apply the same guard to
related success/error state updates so an older request cannot overwrite the
newer dataset’s state.
🧹 Nitpick comments (2)
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx (2)

131-136: 🚀 Performance & Scalability | 🔵 Trivial

Full job-history fetch just to populate a dropdown.

fetchAgentEvalJobs paginates the entire workspace's evaluation job history (unbounded while loop in api.ts). It's often cache-warm here since the query key matches the list route's, but any standalone usage of this modal (the docstring at lines 98-101 mentions an AgentPanel context) triggers this full fetch purely to build the "existing eval config" dropdown. Consider a lighter, agent-scoped endpoint/query as job volume grows.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx`
around lines 131 - 136, The SubmitEvaluationModal query currently loads all
workspace evaluation jobs via fetchAgentEvalJobs solely for the existing-config
dropdown. Replace this with a lightweight agent-scoped query or endpoint that
retrieves only configurations relevant to the selected agent, while preserving
the dropdown’s existing behavior and loading state.

164-178: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Silent catch-all on output-fileset pre-create.

Any error (not just an expected 409) is swallowed with no logging. Since this is best-effort and won't block submission, at least logging the failure would preserve visibility into recurring pre-create issues.

🔍 Proposed tweak
       } catch {
-        // Best-effort: if this fails, the job still auto-creates the output
-        // fileset (without a description). Don't block submission.
+        // Best-effort: if this fails, the job still auto-creates the output
+        // fileset (without a description). Don't block submission, but log
+        // it so recurring failures are visible.
       }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx`
around lines 164 - 178, Update the catch block around filesCreateFileset in the
outputFileset pre-creation flow to capture the error and log it with relevant
context, such as the fileset name, while preserving the best-effort behavior
that allows submission to continue.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx`:
- Around line 81-89: Update the auto-selection logic in the Select component’s
acceptable-file predicate to normalize acceptableFileTypes entries to lowercase
before comparing them with the already lowercased ext, matching
SimpleFilesTable’s allowedExtensions behavior.

In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx`:
- Around line 57-80: Add format validation for the create-mode newName field in
submitEvaluationSchema before it is passed through buildSubmitSpec as
evalConfigFileset. Validate the platform-supported fileset naming rules inline,
while preserving the existing required-name check and applying the format
constraint only when evalConfig is CREATE_NEW.

In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.ts`:
- Around line 65-71: Update the non-CREATE_NEW branch in submitEvaluationSpec to
validate the existingConfigs lookup result before constructing the submission.
If formData.evalConfig is missing, throw a clear error instead of defaulting
evalConfig to an empty string; preserve the existing return structure for
successful lookups.
- Around line 72-82: Update buildSubmitSpec’s MODE_FILESET branch to validate
datasetFile before passing it to parseFilesetLocation, then validate the parsed
result and its objectPath before accessing fields. Remove both non-null
assertions and throw a descriptive error when either validation fails, while
preserving the existing evalConfig and evalConfigFileset mapping for valid
fileset input.

---

Outside diff comments:
In `@web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx`:
- Around line 61-97: Update handleDatasetSelect to guard the asynchronous
filesListFilesetFiles response against stale dataset selections: track the
active request or verify that the current selected dataset still matches fileset
before dispatching SET_FILES or TOGGLE_FILE_SELECTION. Apply the same guard to
related success/error state updates so an older request cannot overwrite the
newer dataset’s state.

---

Nitpick comments:
In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx`:
- Around line 131-136: The SubmitEvaluationModal query currently loads all
workspace evaluation jobs via fetchAgentEvalJobs solely for the existing-config
dropdown. Replace this with a lightweight agent-scoped query or endpoint that
retrieves only configurations relevant to the selected agent, while preserving
the dropdown’s existing behavior and loading state.
- Around line 164-178: Update the catch block around filesCreateFileset in the
outputFileset pre-creation flow to capture the error and log it with relevant
context, such as the fileset name, while preserving the best-effort behavior
that allows submission to continue.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 24ea5681-29d4-49b2-aeb3-eb2fb5cb8e2f

📥 Commits

Reviewing files that changed from the base of the PR and between 6018313 and ceea36c.

📒 Files selected for processing (17)
  • web/packages/common/src/components/DatasetFileSelect/ControlledDatasetFileSelect.tsx
  • web/packages/common/src/components/DatasetFileSelect/DatasetFileSelect.tsx
  • web/packages/common/src/components/UploadModal/Context/useUploadModalReducer.ts
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx
  • web/packages/common/src/components/UploadModal/InlineUploadPicker.tsx
  • web/packages/common/src/components/UploadModal/SimpleFilesTable.tsx
  • web/packages/common/src/components/UploadModal/types.ts
  • web/packages/common/src/utils/generateDefaultName.ts
  • web/packages/studio/public/sample-agents/email-phishing-analyzer/eval.yml
  • web/packages/studio/src/components/DatasetsTable/columns.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationsListRoute.test.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationsListRoute.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.test.ts
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.ts
  • web/packages/studio/src/routes/agents/AgentSuggestionsRoute/api.ts

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 23845/31009 76.9% 61.7%
Integration Tests 13817/29658 46.6% 19.6%

Comment thread web/packages/studio/src/components/DatasetsTable/columns.tsx Outdated
… for config

Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
@nv-odrulea nv-odrulea force-pushed the reusable-eval-configs/odrulea branch from fda9b55 to c5721bb Compare July 14, 2026 02:34

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx (1)

295-301: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Isolate buildSubmitSpec from the swallowing catch.

buildSubmitSpec runs synchronously inside the same try as submitEvaluation. If it throws (e.g. parseFilesetLocation(...)! or getSampleAgent on a bad key), the empty catch swallows it silently — submitError never gets set (it's a mutation-only error), so errorText never renders and the user gets no feedback at all.

🐛 Proposed fix
   const onSubmit: SubmitHandler<SubmitEvaluationFormData> = async (formData) => {
+    let spec: SubmitSpec;
+    try {
+      spec = buildSubmitSpec(formData, existingConfigs);
+    } catch (err) {
+      toast.error(err instanceof Error ? err.message : 'Failed to build evaluation spec');
+      return;
+    }
     try {
-      await submitEvaluation(buildSubmitSpec(formData, existingConfigs));
+      await submitEvaluation(spec);
     } catch {
       // Error rendered via errorText prop.
     }
   };

Based on learnings, avoid "empty" catch {} blocks in onSubmit/submit handlers that would swallow errors from buildSubmitSpec — isolate it outside the try so build/runtime failures don't cause a silent UX regression.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx`
around lines 295 - 301, Move the synchronous buildSubmitSpec(formData,
existingConfigs) call outside the try block in onSubmit, then pass its result
into submitEvaluation within the existing error-handling scope. Keep the catch
for submitEvaluation failures and preserve the errorText behavior, while
allowing buildSubmitSpec failures to propagate instead of being silently
swallowed.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx`:
- Around line 295-301: Move the synchronous buildSubmitSpec(formData,
existingConfigs) call outside the try block in onSubmit, then pass its result
into submitEvaluation within the existing error-handling scope. Keep the catch
for submitEvaluation failures and preserve the errorText behavior, while
allowing buildSubmitSpec failures to propagate instead of being silently
swallowed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 896c2d17-5937-43d2-ba41-d69aca93cc55

📥 Commits

Reviewing files that changed from the base of the PR and between fda9b55 and c5721bb.

📒 Files selected for processing (16)
  • web/packages/common/src/components/DatasetFileSelect/ControlledDatasetFileSelect.tsx
  • web/packages/common/src/components/DatasetFileSelect/DatasetFileSelect.tsx
  • web/packages/common/src/components/UploadModal/Context/useUploadModalReducer.ts
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx
  • web/packages/common/src/components/UploadModal/InlineUploadPicker.tsx
  • web/packages/common/src/components/UploadModal/SimpleFilesTable.tsx
  • web/packages/common/src/components/UploadModal/types.ts
  • web/packages/studio/public/sample-agents/email-phishing-analyzer/eval.yml
  • web/packages/studio/src/components/DatasetsTable/columns.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationsListRoute.test.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationsListRoute.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.test.ts
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.ts
  • web/packages/studio/src/routes/agents/AgentSuggestionsRoute/api.ts
🚧 Files skipped from review as they are similar to previous changes (14)
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationsListRoute.test.tsx
  • web/packages/studio/public/sample-agents/email-phishing-analyzer/eval.yml
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationsListRoute.tsx
  • web/packages/studio/src/routes/agents/AgentSuggestionsRoute/api.ts
  • web/packages/common/src/components/DatasetFileSelect/ControlledDatasetFileSelect.tsx
  • web/packages/studio/src/components/DatasetsTable/columns.tsx
  • web/packages/common/src/components/UploadModal/types.ts
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.test.ts
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
  • web/packages/common/src/components/UploadModal/InlineUploadPicker.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.ts
  • web/packages/common/src/components/UploadModal/SimpleFilesTable.tsx
  • web/packages/common/src/components/UploadModal/Context/useUploadModalReducer.ts
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx

@nv-odrulea nv-odrulea added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 8cedbd4 Jul 14, 2026
57 checks passed
@nv-odrulea nv-odrulea deleted the reusable-eval-configs/odrulea branch July 14, 2026 18:01
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