docs(evaluator-sdk): agentic-eval tutorial notebook (Codex via NeMo Fabric) - #565
Conversation
73dc920 to
be2593b
Compare
634c946 to
43c8c3c
Compare
be2593b to
6fd4691
Compare
43c8c3c to
9362c97
Compare
9362c97 to
3222e83
Compare
|
3222e83 to
cdd8005
Compare
c358bce to
fbd0c05
Compare
6372073 to
f92fd9c
Compare
19724e2 to
d72f36b
Compare
d72f36b to
ba2761e
Compare
f92fd9c to
1242b12
Compare
ba2761e to
4e98fe9
Compare
1242b12 to
f81f421
Compare
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a notebook that demonstrates agentic evaluation with NeMo Fabric, including setup, custom scoring, task definitions, Fabric execution, and result inspection. ChangesFabric Agentic Eval Notebook
Sequence Diagram(s)sequenceDiagram
participant Notebook
participant AgentEvaluator
participant FabricAgentRuntime
participant Dashboard
Notebook->>AgentEvaluator: run_sync(taskset, target)
AgentEvaluator->>FabricAgentRuntime: launch trials with Codex CLI harness
FabricAgentRuntime->>Dashboard: write run bundle and trajectory evidence
AgentEvaluator->>Notebook: return result.summary and result.scores
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/nemo_evaluator_sdk/examples/agentic_eval_with_fabric.ipynb (1)
118-237: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated evidence→workspace guard across all four metrics.
evidence = input.candidate.evidence; if evidence is not None and evidence.get("workspace") is not None: ws = await evidence.filesystem("workspace")is repeated verbatim inWorkspaceFileContains,WorkspaceFileUnchanged,PytestResults(lines 118-237), and again inLlmDocReview(lines 401-409). Extract a small helper.♻️ Suggested helper
+async def _open_workspace(evidence): + """Return the workspace filesystem from evidence, or None if absent.""" + if evidence is not None and evidence.get("workspace") is not None: + return await evidence.filesystem("workspace") + return NoneThen each
compute_scoresbecomes:- evidence = input.candidate.evidence - if evidence is not None and evidence.get("workspace") is not None: - ws = await evidence.filesystem("workspace") - if await ws.exists(self._path): + ws = await _open_workspace(input.candidate.evidence) + if ws is not None: + if await ws.exists(self._path):Also applies to: 401-409
🤖 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 `@packages/nemo_evaluator_sdk/examples/agentic_eval_with_fabric.ipynb` around lines 118 - 237, Repeated evidence-to-workspace access logic is duplicated across WorkspaceFileContains, WorkspaceFileUnchanged, PytestResults, and LlmDocReview. Extract a small shared helper that checks input.candidate.evidence for a workspace and returns the filesystem object, then update each compute_scores method to call it instead of repeating the guard and await evidence.filesystem("workspace") sequence.
🤖 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.
Nitpick comments:
In `@packages/nemo_evaluator_sdk/examples/agentic_eval_with_fabric.ipynb`:
- Around line 118-237: Repeated evidence-to-workspace access logic is duplicated
across WorkspaceFileContains, WorkspaceFileUnchanged, PytestResults, and
LlmDocReview. Extract a small shared helper that checks input.candidate.evidence
for a workspace and returns the filesystem object, then update each
compute_scores method to call it instead of repeating the guard and await
evidence.filesystem("workspace") sequence.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1edbe513-9af8-4ae3-b8f4-314cf934c108
📒 Files selected for processing (1)
packages/nemo_evaluator_sdk/examples/agentic_eval_with_fabric.ipynb
…abric) End-to-end agentic-eval walkthrough: a small suite of coding tasks (fix a bug, write tests, write docs) run against Codex driven by NeMo Fabric, scored with metrics that inspect the agent's real workspace, and rolled up into one comparable `correctness` view. - Target is FabricAgentRuntime: Fabric drives the Codex CLI, runs each task in its own workspace, exposes the final tree as evidence, and captures the ATIF trajectory. Prereqs document the native install (nemo-fabric[codex,relay] + codex + nemo-relay gateway + a NeMo-Fabric checkout for base_dir). - Held-out grading two ways: fix-bug keeps the test suite in the task's grader-only `reference` and overlays it into a throwaway copy via run_verifier(overlay_files=...); write-tests keeps the authoritative module in `reference` and checksums the agent's copy against it (impl_unchanged), so editing the code under test fails the correctness view. Includes a callout on why you must not grade with artifacts the agent can edit. - ViewSignals reference `metric.type` rather than string literals. - Groups the suite into an AgentEvalTaskset. Signed-off-by: Sandy Chapman <schapman@nvidia.com>
7eebacf to
1ff0b2a
Compare
End-to-end agentic-eval walkthrough: a small suite of coding tasks (fix a bug, write tests, write docs) run against Codex driven by NeMo Fabric, scored with metrics that inspect the agent's real workspace, rolled up into one comparable
correctnessview.Reworked from the earlier Codex-CLI draft to reflect current
mainand the workspace support in #573:FabricAgentRuntime: Fabric drives the Codex CLI, runs each task in its own per-task workspace, exposes the final tree asworkspaceevidence, and captures the ATIFtrace(capture_trajectory=True). Depends on feat(evaluator-sdk): per-task workspace + held-out overlay verifier for Fabric agent-eval #573.referenceand is overlaid into a throwaway copy at scoring time viarun_verifier(overlay_files=...)(also from feat(evaluator-sdk): per-task workspace + held-out overlay verifier for Fabric agent-eval #573). The agent only ever sees the buggy source; it can't edit the tests that grade it.referenceand aWorkspaceFileUnchangedmetric checksums the agent's copy against it (impl_unchanged); editing the code under test fails thecorrectnessview.ViewSignals referencemetric.typeinstead of string literals.AgentEvalTaskset.agentic_eval_with_fabric.ipynb; prereqs document the native Fabric install.Verification
Fabric target + run cells need the native stack (documented). Everything else validated locally against the SDK:
ruff formatclean.impl_unchangedis True for an untouched module, False when tampered; the agent's own tests run and pass against the verified module.Stack
main← #561 (Taskset) ← #573 (workspace support) ← #565 (this). Base retargets tomainas parents merge.🤖 Generated with Claude Code
Summary by CodeRabbit