feat(studio): tables for agent eval list and details - #839
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (12)
📝 WalkthroughWalkthroughEvaluation submissions now store fileset metadata and generate valid job names. Agent evaluation APIs fetch configuration and scores, while list and detail routes use shared data views. Task results and model comparison cells now support expandable table content. ChangesAgent evaluation workflow
Sequence Diagram(s)sequenceDiagram
participant AgentEvaluationsDataView
participant EvaluatorJobsAPI
participant EvaluationResultsAPI
participant StudioDataView
AgentEvaluationsDataView->>EvaluatorJobsAPI: list filtered and sorted jobs
AgentEvaluationsDataView->>EvaluationResultsAPI: fetch results for job names
EvaluationResultsAPI-->>AgentEvaluationsDataView: return results keyed by job name
AgentEvaluationsDataView->>StudioDataView: render jobs and aggregated scores
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
web/packages/studio/src/api/evaluation/agent-evaluations.ts (1)
20-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winImport
ResultFilteras a type.Line 20 is only used in a generic; change it to
type ResultFilter. As per coding guidelines, useimport typefor type-only imports in TypeScript.🤖 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/api/evaluation/agent-evaluations.ts` at line 20, Update the ResultFilter import in the agent evaluations module to use a type-only import, since it is only referenced in a generic and has no runtime usage. Preserve the existing import source and other imports.Source: Coding guidelines
web/packages/studio/src/components/dataViews/AgentEvaluationsDataView/index.tsx (1)
51-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd explicit
FCtyping for consistency.Every other exported component in this cohort (
AgentEvaluationsListRoute,AgentEvalTaskResultsPanel,LongCell,TableExpandableCell) is typed withFC/FC<Props>; this component isn't. As per coding guidelines, "Use explicit return types for public APIs and complex functions in TypeScript."♻️ Proposed fix
-import { ComponentProps, useMemo, useState } from 'react'; +import { ComponentProps, type FC, useMemo, useState } from 'react'; ... -export const AgentEvaluationsDataView = () => { +export const AgentEvaluationsDataView: FC = () => {🤖 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/components/dataViews/AgentEvaluationsDataView/index.tsx` at line 51, Update the exported AgentEvaluationsDataView component declaration to use the explicit React FC type, matching the typing convention used by the other listed components while preserving its existing props and implementation.Source: Coding guidelines
🤖 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/studio/src/components/dataViews/AgentEvaluationsDataView/index.tsx`:
- Around line 71-83: Update handleDeleteJobs to use Promise.allSettled so every
deleteJobMutation.mutateAsync operation completes and each failed job is
retained with its job name and error details. Propagate an aggregate failure
containing all failed deletions to callers while preserving successful deletions
and the existing per-job error context.
- Around line 123-131: Keep the agent evaluation score lookup aligned with the
view’s maximum page size. In the pagination/query flow around the jobs list and
the resultsByName useQuery, ensure fetchAgentEvalResultsForJobs receives no more
than 100 job names, either by clamping the effective page size to 100 or
batching the score requests, so every displayed row can receive a score.
In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.ts`:
- Line 80: Update the field documentation in
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.ts
at lines 80-80 and the corresponding test description in
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.test.ts
at lines 94-94 to reference the actual metadata key
spec.benchmark.eval_config_fileset instead of spec.benchmark.eval_config.
---
Nitpick comments:
In `@web/packages/studio/src/api/evaluation/agent-evaluations.ts`:
- Line 20: Update the ResultFilter import in the agent evaluations module to use
a type-only import, since it is only referenced in a generic and has no runtime
usage. Preserve the existing import source and other imports.
In
`@web/packages/studio/src/components/dataViews/AgentEvaluationsDataView/index.tsx`:
- Line 51: Update the exported AgentEvaluationsDataView component declaration to
use the explicit React FC type, matching the typing convention used by the other
listed components while preserving its existing props and implementation.
🪄 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: 31091078-c670-4c25-87de-4b48edd4a8fe
📒 Files selected for processing (13)
web/packages/common/src/components/DataView/TableExpandableCell/index.tsxweb/packages/studio/src/api/evaluation/agent-evaluations.test.tsweb/packages/studio/src/api/evaluation/agent-evaluations.tsweb/packages/studio/src/components/ModelComparePrompts/ModelCompareTable.tsxweb/packages/studio/src/components/ModelComparePrompts/types.tsweb/packages/studio/src/components/dataViews/AgentEvaluationsDataView/index.tsxweb/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationDetailRoute.tsxweb/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationsListRoute.tsxweb/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/AgentEvalTaskResultsPanel.test.tsxweb/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/AgentEvalTaskResultsPanel.tsxweb/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/SubmitEvaluationModal.tsxweb/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.test.tsweb/packages/studio/src/routes/agents/AgentEvaluationsRoute/components/submitEvaluationSpec.ts
|
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
0190b2d to
3e9e37c
Compare
* feat(studio): tables for agent eval list and details Signed-off-by: Octavian Drulea <odrulea@nvidia.com> * fix(studio): coderabbit comments Signed-off-by: Octavian Drulea <odrulea@nvidia.com> * fix(studio): coderabbit comments Signed-off-by: Octavian Drulea <odrulea@nvidia.com> --------- Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Summary by CodeRabbit