docs(evaluator): fix submit() packager, FilesetRef import, and leaked titles - #406
Conversation
…ef, and leaked titles The Evaluator docs drifted from the current plugin SDK contract. This brings the runnable snippets back in line and fixes two broken tutorial titles. - submit(): add the now-required `metric_bundle_packager=CloudpickleMetricBundlePackager()` (and its import) to every runnable `evaluator.submit(...)` example across index, sdk-resources, and the metrics/* and tutorials/* pages. `run()` examples are unchanged (they do not take the packager). - LLM Judge tutorial: import `FilesetRef` from `nemo_evaluator.sdk` instead of the non-existent `nemo_evaluator_sdk.values.FilesetRef`. - model-configuration: document that local `run()` requires an inline `Model` while remote `submit()` also accepts a `ModelRef`. - test_doc_examples.py: replace the stale `/v2/...` REST script with offline contract checks for the import paths and the submit() packager requirement. - Fix two tutorial pages that rendered `@nemo-nb: hide` as the page title (leaked cell marker in frontmatter `title`); set real titles and drop the duplicate body H1, matching every other evaluator page. Verified: `make docs-check` and `make docs-broken-links` pass; ruff/ty clean; the new contract test passes (7/7); both tutorial titles confirmed via the Fern dev-server render. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Sandy Chapman <schapman@nvidia.com>
|
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAll ChangesCloudpickleMetricBundlePackager wiring across docs and tests
Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@docs/evaluator/metrics/model-configuration.mdx`:
- Around line 213-218: The ModelRef instantiation in the evaluator.submit() call
is missing the required params argument. Add a params parameter to the ModelRef
constructor that specifies RunConfigOnlineModel configuration with the necessary
required parameters. This ensures the example complies with the upstream
contract that enforces RunConfigOnlineModel params for ModelRef targets and
prevents the TypeError at runtime.
🪄 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: d1a84a3d-0800-4a10-9f00-1cbbb34d8806
📒 Files selected for processing (15)
docs/evaluator/index.mdxdocs/evaluator/metrics/agent-configuration.mdxdocs/evaluator/metrics/agentic.mdxdocs/evaluator/metrics/job-management.mdxdocs/evaluator/metrics/llm-as-a-judge.mdxdocs/evaluator/metrics/manage-metrics.mdxdocs/evaluator/metrics/model-configuration.mdxdocs/evaluator/metrics/rag.mdxdocs/evaluator/metrics/remote.mdxdocs/evaluator/metrics/results.mdxdocs/evaluator/metrics/similarity.mdxdocs/evaluator/sdk-resources.mdxdocs/evaluator/test_doc_examples.pydocs/evaluator/tutorials/define-run-custom-python-metrics.mdxdocs/evaluator/tutorials/run-llm-judge-evaluation.mdx
Address review feedback on #406: - ModelRef submit example now passes config=RunConfigOnlineModel(). A ModelRef target generates outputs online, and _submit_params raises TypeError("ModelRef target requires RunConfigOnlineModel") otherwise — so the example was not runnable. (CodeRabbit flagged this; its suggested fix used params=/the plugin import path — the public submit() keyword is config= and the value type is imported from nemo_evaluator_sdk like the other docs.) - Rename test_submit_exposes_metric_bundle_packager_but_run_does_not to test_packager_param_is_submit_only (reviewer: name too long). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Sandy Chapman <schapman@nvidia.com>
Summary
The Evaluator docs had drifted from the current
nemo_evaluatorplugin SDK contract, so several copy-paste examples failed before reaching execution. This PR realigns the runnable snippets and fixes two unrelated broken page titles found along the way.What changed
submit()requires a metric bundle packager. Addedmetric_bundle_packager=CloudpickleMetricBundlePackager()(and its import) to every runnableevaluator.submit(...)example acrossindex,sdk-resources, and themetrics/*+tutorials/*pages.run()examples are untouched —run()does not take the packager.FilesetReffrom the non-existentnemo_evaluator_sdk.values; it now imports fromnemo_evaluator.sdk(anImportErrorat the top of the tutorial before).metrics/model-configuration.mdxnow states that localrun()requires an inlineModel, while remotesubmit()also accepts aModelRef(workspace/model-name).test_doc_examples.pyno longer calls the old/v2/...REST endpoints; it now runs offline contract checks for the SDK import paths and thesubmit()packager requirement.@nemo-nb: hideas the page title (anemo_nbcell marker that leaked into frontmattertitle). Set real titles and removed the duplicate body H1, matching every other evaluator page.Not changed (investigated, no action needed)
agentic-metrics,rag-metrics,bring-your-own-metric, etc. resolve.make docs-broken-linkspasses.Testing
make docs-check→ 0 errors, 194 MDX files parse cleanlymake docs-broken-links→ all checks passedruff+tyclean; new contract test passes 7/7<title>/<h1>, no@nemo-nb)🤖 Generated with Claude Code
Summary by CodeRabbit
metric_bundle_packager=CloudpickleMetricBundlePackager()when submitting jobs.ModelRefusage.metric_bundle_packagerbehavior.