Skip to content

docs(evaluator-sdk): add Fabric harness config examples - #571

Merged
SandyChapman merged 1 commit into
mainfrom
fabric-harness-examples/schapman
Jul 7, 2026
Merged

docs(evaluator-sdk): add Fabric harness config examples#571
SandyChapman merged 1 commit into
mainfrom
fabric-harness-examples/schapman

Conversation

@SandyChapman

@SandyChapman SandyChapman commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Adds packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py — a standalone example showing how the same FabricAgentRuntime targets different agent harnesses purely via the Fabric config, and points the FabricAgentRuntime docstring at it.

Why

Follow-up to #564 (Fabric agent-eval runner). Addresses @arpitsardhana's approval note: "It would be nice to add Fabric Profile example for different harness to get sense of different runtimes structure."

Contents

  • CODEX_CLI_CONFIG (nvidia.fabric.codex.cli) — subprocess transport (transport="cli"), codex-specific harness.settings.
  • HERMES_SDK_CONFIG (nvidia.fabric.hermes.sdk) — in-library transport (transport="library"), explicit chat/message schemas.
  • A build_runtime(harness, model=…) helper and a main() that prints each config, so the structural difference (adapter_id, runtime.transport, harness.settings) is obvious.

The module imports and builds the runtimes without the optional native deps (only run_tasks needs nemo-fabric/nemo-relay), so it stays importable in CI. Configs are grounded in Fabric's own test_codex_cli.py / smoke_typed_config.py.

Notes

Docs-only + a docstring pointer; vendored SDK mirror synced. No behavior change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added an example that builds and prints Fabric harness runtime configurations from named, typed presets (including Codex-CLI and Hermes-SDK options).
    • Added a helper to construct a runtime from a selected harness, with optional overrides for model and working directory.
  • Documentation

    • Expanded the Fabric runtime description to clarify how harness selection is determined and what configuration differences to expect.
    • Pointed readers to the new example for concrete Codex and Hermes setup references.

@SandyChapman
SandyChapman requested review from a team as code owners July 6, 2026 15:55
@github-actions github-actions Bot added the docs label Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new example module that defines Codex CLI and Hermes SDK harness configs, builds runtimes from a named harness, and prints each config as JSON. Updates FabricAgentRuntime docs to describe harness selection and reference the example.

Changes

Fabric harness runtime example

Layer / File(s) Summary
Harness config definitions and registry
packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py
Adds the module docstring, typed Fabric config imports, Codex CLI and Hermes SDK config objects, and the HARNESS_CONFIGS registry.
Runtime builder and entrypoint
packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py
Adds build_runtime(), main(), and the script guard that validates each registered harness and prints its config mapping.
Runtime docstring update
packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/runtimes/fabric/runtime.py
Expands FabricAgentRuntime docstring to describe adapter_id-driven harness selection and reference the example module.

Possibly related PRs

Suggested labels: feat

Suggested reviewers: ngoncharenko, arpitsardhana

🚥 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 The title clearly matches the main change: adding Fabric harness config examples in the evaluator SDK.
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.
✨ 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 fabric-harness-examples/schapman

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: 2

🤖 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 `@packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py`:
- Around line 8-9: The docstring in fabric_harness_runtimes.py has a
broken/incomplete sentence describing harness differences; update the
surrounding text so the clause introduced by adapter_id, runtime.transport, and
harness.settings is grammatically complete. Edit the docstring near the existing
configuration explanation in the module-level text so it reads as a finished
sentence rather than a cut-off fragment.

In
`@packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/runtimes/fabric/runtime.py`:
- Around line 72-74: The module docstring in FabricRuntime has an incomplete
sentence describing how harness config differs, so update that prose to match
the example module’s grammar and make the “config shape differs mainly in that
…” statement a complete sentence. Locate the text in the Fabric runtime
docstring near the mention of adapter_id, runtime.transport, and
harness.settings, and rewrite it so the harness selection/configuration
description reads cleanly and ends properly.
🪄 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: 0fc61336-4201-472e-846a-705850f18bb9

📥 Commits

Reviewing files that changed from the base of the PR and between 4b9b24e and 5322542.

⛔ Files ignored due to path filters (1)
  • sdk/python/nemo-platform/src/nemo_platform/beta/evaluator/agent_eval/runtimes/fabric/runtime.py is excluded by !sdk/**
📒 Files selected for processing (2)
  • packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py
  • packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/runtimes/fabric/runtime.py

Comment thread packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py Outdated
@SandyChapman
SandyChapman deleted the fabric-harness-examples/schapman branch July 6, 2026 15:58
@SandyChapman
SandyChapman restored the fabric-harness-examples/schapman branch July 6, 2026 16:04
@SandyChapman SandyChapman reopened this Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 23090/30222 76.4% 61.3%
Integration Tests 13259/28902 45.9% 19.1%

Add examples/fabric_harness_runtimes.py showing Codex-CLI (subprocess,
transport=cli) vs Hermes-SDK (in-library, transport=library) Fabric config
shapes and building FabricAgentRuntime per harness, so callers can see how the
structure differs (adapter_id, runtime.transport, harness.settings). The
FabricAgentRuntime docstring now points at it. Addresses review feedback on #564.

Signed-off-by: Sandy Chapman <schapman@nvidia.com>
@SandyChapman
SandyChapman force-pushed the fabric-harness-examples/schapman branch from 5322542 to 1a20d4f Compare July 6, 2026 16:06

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

🧹 Nitpick comments (1)
packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py (1)

64-66: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

HARNESS_CONFIGS[harness] raises unhelpful KeyError on typo.

🔧 Proposed fix
 def build_runtime(harness: str, *, model: str | None = None, work_root: str | None = None) -> FabricAgentRuntime:
     """Build a :class:`FabricAgentRuntime` for a named harness (see :data:`HARNESS_CONFIGS`)."""
+    if harness not in HARNESS_CONFIGS:
+        raise ValueError(f"Unknown harness {harness!r}; choose from {sorted(HARNESS_CONFIGS)}")
     return FabricAgentRuntime(config=HARNESS_CONFIGS[harness], model=model, work_root=work_root)
🤖 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/fabric_harness_runtimes.py` around lines
64 - 66, The build_runtime helper currently indexes HARNESS_CONFIGS directly, so
a typo in harness raises a bare KeyError with no context. Update build_runtime
to validate the harness name before constructing FabricAgentRuntime, and raise a
clearer exception that includes the invalid harness and the available harness
names from HARNESS_CONFIGS. Use build_runtime and HARNESS_CONFIGS as the key
symbols to locate the change.
🤖 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/fabric_harness_runtimes.py`:
- Around line 64-66: The build_runtime helper currently indexes HARNESS_CONFIGS
directly, so a typo in harness raises a bare KeyError with no context. Update
build_runtime to validate the harness name before constructing
FabricAgentRuntime, and raise a clearer exception that includes the invalid
harness and the available harness names from HARNESS_CONFIGS. Use build_runtime
and HARNESS_CONFIGS as the key symbols to locate the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: eb8f0e1c-c361-4b9c-b7f1-33438e3b2925

📥 Commits

Reviewing files that changed from the base of the PR and between 5322542 and 1a20d4f.

⛔ Files ignored due to path filters (1)
  • sdk/python/nemo-platform/src/nemo_platform/beta/evaluator/agent_eval/runtimes/fabric/runtime.py is excluded by !sdk/**
📒 Files selected for processing (2)
  • packages/nemo_evaluator_sdk/examples/fabric_harness_runtimes.py
  • packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/runtimes/fabric/runtime.py
✅ Files skipped from review due to trivial changes (1)
  • packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/runtimes/fabric/runtime.py

@SandyChapman
SandyChapman enabled auto-merge July 7, 2026 15:44
@SandyChapman
SandyChapman added this pull request to the merge queue Jul 7, 2026
Merged via the queue into main with commit 99818bb Jul 7, 2026
55 checks passed
@SandyChapman
SandyChapman deleted the fabric-harness-examples/schapman branch July 7, 2026 15:57
arpitsardhana pushed a commit that referenced this pull request Jul 9, 2026
Add examples/fabric_harness_runtimes.py showing Codex-CLI (subprocess,
transport=cli) vs Hermes-SDK (in-library, transport=library) Fabric config
shapes and building FabricAgentRuntime per harness, so callers can see how the
structure differs (adapter_id, runtime.transport, harness.settings). The
FabricAgentRuntime docstring now points at it. Addresses review feedback on #564.

Signed-off-by: Sandy Chapman <schapman@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