Skip to content

feat(evaluator): model evaluate wire publish_to_intake() to API - #1152

Merged
nv-odrulea merged 9 commits into
mainfrom
od/model-eval-api-publish-to-intake
Aug 12, 2026
Merged

feat(evaluator): model evaluate wire publish_to_intake() to API#1152
nv-odrulea merged 9 commits into
mainfrom
od/model-eval-api-publish-to-intake

Conversation

@nv-odrulea

@nv-odrulea nv-odrulea commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

POST /evaluate/jobs (dataset-driven evaluation) can now publish its results to Intake, so those
runs reach Experiments the same way agent evaluations do after #. Studio submits to both
endpoints, so users saw one "evaluation" concept where only half of it could be published.

{
  "publication": {
    "intake": {
      "evaluation_id": "email-security-baseline",
      "agent_name": "email-security-analyst",
      "test_case_id_field": "question_id",
      "required": true
    }
  }
}

Absent → no publish, zero Intake calls.

Related Issue

https://linear.app/nvidia/issue/ASTD-384/agent-experiments-evaluator-publish-to-intake-from-api

Approach: adapt, don't duplicate

Row results are adapted into an AgentEvalResult and go through the existing publish_to_intake.
intake/publish.py and intake/mapping.py are untouched, so the dataset path inherits the
idempotency guarantee rather than reimplementing it.

This isn't a semantic squeeze: agent-eval's published trajectory is already a stub single step
carrying output text, and RowScore.sample is literally {"output_text": ..., "response": ...}
the field names of AgentOutput. One row → one trial, one (row, metric key) → one score.

Notable decisions

  • test_case_id defaults to row position, overridable by column. row_index is weaker than it
    looks: discover_files uses rglob/glob with no sorted(), so multi-file/glob datasets
    concatenate in filesystem order and positions shift between runs. Naming a column via
    test_case_id_field gives stable identity; a configured column missing from the row raises
    rather than silently falling back, since a silent fallback would reinstate exactly the instability
    the field exists to remove.
  • run_id is the job id. Unlike agent-eval, whose result carries a generated run_id, a row
    result has none — so a platformless local run has nothing stable to key sessions on and reports a
    publication failure instead of publishing.
  • started_at is stamped by the job. The row evaluator records no timing anywhere and
    EvaluationResult has no model_config, so there is nowhere to put it. Publication needs a start
    time that's a function of the run, not of when it was published.
  • Submit-time identity validation. A Model target names a model, not an agent. Without the
    ported validator every trajectory would publish under agent_name="". Now a 422 at submit.

Refactors this required

  • Import cycle fix. evaluate.py couldn't import jobs/publication.py:
    publication → intake.publish → sdk.http_utils → jobs.evaluate. Fixed structurally rather than
    with a TYPE_CHECKING import (AGENTS.md forbids those): moved create_job_payload — two lines,
    one consumer that already imported EvaluateInputSpec — out of http_utils into sdk/_executor.py.
    The edge is gone for every future caller.
  • PublicationSpec / IntakePublicationSpec moved from jobs/agent_spec.py to a neutral
    jobs/publication_spec.py, which also holds the row variants. Subclassed rather than adding
    test_case_id_field to the shared class, so each endpoint's generated contract stays honest.
  • Fixed 4 pre-existing ty errors in files this change had to stage (evaluate.py's too-narrow
    to_spec async_sdk annotation, 3 in test_sdk.py). Plugin diagnostics: 73 → 69.

Testing

  • 768 unit tests (20 new: 13 adapter, 7 job wiring), full pre-commit green including the
    staged-files ty hook.
  • 4 integration tests against live Intake + ClickHouse, including
    test_row_result_publishes_and_is_idempotent — re-publishing yields one trace, with test_case_id
    taken from the configured column.

Caveats

  • Metric naming. Intake rows use {metric_type}.{output}, the multi-metric convention. A
    single-metric run will show exact_match.score in Intake where its own aggregate says score.
    Deliberate — consistency with Intake and agent-eval wins.
  • Idempotency scope. Re-publish safety rests on ctx.job_id, stable across a retry of the same
    job but not across a re-run. A re-run is a new run and correctly gets new sessions.
  • BenchmarkEvaluationResult repeats every row under per_metric; the adapter reads top-level
    row_scores only (commented and pinned by a test) or each row would publish once per metric.

Summary by CodeRabbit

  • New Features

    • Added optional publication of row-based evaluation results to Intake.
    • Supports existing evaluation IDs, agent metadata, configurable test-case identifiers, and required or optional publication behavior.
    • Evaluation results now include publication outcomes and run metadata when configured.
    • Added support for publishing results from models and agent instances.
  • Bug Fixes

    • Improved handling of missing, duplicate, and failed row evaluations.
    • Preserved stable identities and metadata during repeated publication.

@nv-odrulea
nv-odrulea requested review from a team as code owners August 6, 2026 23:06
@nv-odrulea nv-odrulea self-assigned this Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The evaluator now supports optional Intake publication for dataset-row results. It adds strict publication schemas, stable row-result adaptation, target identity resolution, post-persistence publication, local job payload serialization, and unit and integration coverage.

Changes

Evaluator Intake publication

Layer / File(s) Summary
Publication contracts and job payloads
plugins/nemo-evaluator/openapi/openapi.yaml, plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py, plugins/nemo-evaluator/src/nemo_evaluator/sdk/*, plugins/nemo-evaluator/tests/test_sdk.py
The API and Pydantic models define agent and row publication settings. Job payload serialization now resides in _executor.py.
Stable timestamps and row-result mapping
plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py, plugins/nemo-evaluator/tests/intake/test_row_adapter.py
Row results map to trials and task scores with stable identities, aggregate scores, diagnostics, and failure statuses.
Publication orchestration and identity validation
plugins/nemo-evaluator/src/nemo_evaluator/jobs/agent_spec.py, plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py
Publication supports bare models and agents, resolves publication identity, adapts row results, and handles missing identities and required-publication failures.
Evaluation job wiring and end-to-end validation
plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py, plugins/nemo-evaluator/tests/jobs/test_publication.py, plugins/nemo-evaluator/tests/integration/test_publish_to_intake.py
Jobs propagate publication settings, record start times, publish after persistence, return publication outcomes, and verify idempotent row publication.

Sequence Diagram(s)

sequenceDiagram
  participant EvaluationJob
  participant publish_row_eval_result
  participant row_result_to_agent_eval_result
  participant publish_agent_eval_result
  participant Intake
  EvaluationJob->>publish_row_eval_result: completed row results and publication settings
  publish_row_eval_result->>row_result_to_agent_eval_result: row results and identity field
  row_result_to_agent_eval_result-->>publish_row_eval_result: AgentEvalResult
  publish_row_eval_result->>publish_agent_eval_result: adapted result and target identity
  publish_agent_eval_result->>Intake: publish evaluation result
  Intake-->>EvaluationJob: publication outcome
Loading

Possibly related PRs

Suggested reviewers: sandychapman, shanaiabuggy, arpitsardhana

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.58% 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 identifies the evaluator change that wires publish_to_intake() to the API, which matches the pull request's primary objective.
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 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch od/model-eval-api-publish-to-intake

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

🧹 Nitpick comments (5)
plugins/nemo-evaluator/tests/intake/test_publish.py (1)

117-128: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a test for the missing started_at path.

publish_to_intake now raises PublishError when result.metadata.started_at is unset. No test covers that branch. Add one that builds the result with RunMetadata() and asserts the raise.

💚 Proposed test
async def test_publish_requires_started_at() -> None:
    result = AgentEvalResult(
        run_id="run-1",
        tasks=[],
        trials=[_trial("t-1")],
        scores=[],
        summary=AgentEvalSummary(),
        metadata=RunMetadata(),
    )
    with pytest.raises(PublishError, match="started_at is unset"):
        await publish_to_intake(result, platform=_platform(), experiment_id="exp", workspace="ws")
🤖 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 `@plugins/nemo-evaluator/tests/intake/test_publish.py` around lines 117 - 128,
Add a test for the missing started_at branch in publish_to_intake, constructing
an AgentEvalResult with RunMetadata() and representative trial data, then assert
that awaiting publish_to_intake raises PublishError with the expected
“started_at is unset” message.
plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py (1)

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

Consider moving target_agent_identity out of agent_spec.

This PR moved the publication spec classes into a neutral module because both eval specs share them. target_agent_identity has the same property: it resolves bare Model/AgentBase targets that only the row spec uses, and evaluate.py plus publication.py now import agent_spec solely for it. Placing it next to publication_spec.py applies the same reasoning and removes the remaining cross-spec dependency.

🤖 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 `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py` at line 21, Move
target_agent_identity from agent_spec into the neutral module alongside
publication_spec.py, then update evaluate.py and publication.py to import it
from the new location. Remove the old definition and preserve its existing
behavior and callers.
plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py (2)

206-229: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the duplicated failure branching; the missing-run_id path logs nothing.

Both failure blocks repeat the required raise-or-return logic. The first block (206-215) omits the logger.warning that the RowIdentityError block and publish_agent_eval_result.fail both emit, so an optional publication failure caused by a missing job id leaves no log trace.

♻️ Proposed refactor
+    def fail(error: str, cause: Exception | None = None) -> PublicationOutcome:
+        outcome = _failed(spec.evaluation_id, error, None)
+        if spec.required:
+            raise PublicationFailedError(outcome) from cause
+        logger.warning("Publication to Intake failed for evaluation %r: %s", spec.evaluation_id, error)
+        return outcome
+
     if run_id is None:
-        outcome = _failed(
-            spec.evaluation_id,
+        return fail(
             "No job id to publish under (platformless local run); a dataset-driven evaluation takes "
-            "its run identity from the job.",
-            None,
+            "its run identity from the job."
         )
-        if spec.required:
-            raise PublicationFailedError(outcome)
-        return outcome
 
     try:
         adapted = row_result_to_agent_eval_result(
             result,
             run_id=run_id,
             started_at=started_at,
             test_case_id_field=spec.test_case_id_field,
         )
     except RowIdentityError as error:
-        outcome = _failed(spec.evaluation_id, str(error), None)
-        if spec.required:
-            raise PublicationFailedError(outcome) from error
-        logger.warning("Publication to Intake failed for evaluation %r: %s", spec.evaluation_id, error)
-        return outcome
+        return fail(str(error), error)
🤖 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 `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py` around lines
206 - 229, Refactor the failure handling in the publication flow around the
missing run_id and RowIdentityError branches into a shared raise-or-return
helper or equivalent, preserving PublicationFailedError behavior for required
evaluations. Ensure the missing-run_id path also emits the same warning log as
other publication failures before returning for optional evaluations, while
retaining each branch’s existing outcome details.

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

Import the exceptions from nemo_platform. NeMoPlatformError and NotFoundError are public exports.

🤖 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 `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py` at line 31,
Update the import in the publication module to import NeMoPlatformError and
NotFoundError directly from the public nemo_platform package, instead of the
private nemo_platform._exceptions module.
plugins/nemo-evaluator/tests/jobs/test_publication.py (1)

535-564: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a row-path test for required publication failure.

Both row failure tests use required=False. The row path implements its own raise-or-return logic in publish_row_eval_result, separate from publish_agent_eval_result.fail, so a regression that drops the required raise for rows would pass this suite. Add a case that asserts PublicationFailedError for a missing job id or a bad test_case_id_field with required=True.

🤖 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 `@plugins/nemo-evaluator/tests/jobs/test_publication.py` around lines 535 -
564, The row publication tests only cover optional failures and do not verify
required failures raise. Add a test for the row path through EvaluateJob.run
using either missing job_id or an invalid test_case_id_field with required=True,
and assert PublicationFailedError is raised while preserving the existing
no-publication behavior setup.
🤖 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 `@plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py`:
- Around line 38-51: Update the intake flow using _test_case_id to track every
generated test-case id and raise RowIdentityError when an id is produced more
than once, including collisions from repeated test_case_id_field values and
mixed positional fallbacks. Perform the check before inserting or replacing
trial mappings so duplicate rows fail loudly instead of overwriting existing
trajectories.

In `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py`:
- Around line 34-43: Constrain the agent_name and agent_version fields in the
publication specification to non-empty strings by applying the same
minimum-length validation used by evaluation_id. Preserve agent_name’s
optionality and agent_version’s existing default while ensuring explicitly
supplied empty values fail validation before
_require_resolvable_publication_identity runs.

---

Nitpick comments:
In `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py`:
- Line 21: Move target_agent_identity from agent_spec into the neutral module
alongside publication_spec.py, then update evaluate.py and publication.py to
import it from the new location. Remove the old definition and preserve its
existing behavior and callers.

In `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py`:
- Around line 206-229: Refactor the failure handling in the publication flow
around the missing run_id and RowIdentityError branches into a shared
raise-or-return helper or equivalent, preserving PublicationFailedError behavior
for required evaluations. Ensure the missing-run_id path also emits the same
warning log as other publication failures before returning for optional
evaluations, while retaining each branch’s existing outcome details.
- Line 31: Update the import in the publication module to import
NeMoPlatformError and NotFoundError directly from the public nemo_platform
package, instead of the private nemo_platform._exceptions module.

In `@plugins/nemo-evaluator/tests/intake/test_publish.py`:
- Around line 117-128: Add a test for the missing started_at branch in
publish_to_intake, constructing an AgentEvalResult with RunMetadata() and
representative trial data, then assert that awaiting publish_to_intake raises
PublishError with the expected “started_at is unset” message.

In `@plugins/nemo-evaluator/tests/jobs/test_publication.py`:
- Around line 535-564: The row publication tests only cover optional failures
and do not verify required failures raise. Add a test for the row path through
EvaluateJob.run using either missing job_id or an invalid test_case_id_field
with required=True, and assert PublicationFailedError is raised while preserving
the existing no-publication behavior setup.
🪄 Autofix

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: 62533bc1-998e-4801-836c-dbcbcd0adab2

📥 Commits

Reviewing files that changed from the base of the PR and between c71ca67 and 31e9135.

📒 Files selected for processing (17)
  • plugins/nemo-evaluator/openapi/openapi.yaml
  • plugins/nemo-evaluator/src/nemo_evaluator/intake/mapping.py
  • plugins/nemo-evaluator/src/nemo_evaluator/intake/publish.py
  • plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/agent_evaluate.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/agent_spec.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/_executor.py
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/http_utils.py
  • plugins/nemo-evaluator/tests/intake/test_mapping.py
  • plugins/nemo-evaluator/tests/intake/test_publish.py
  • plugins/nemo-evaluator/tests/intake/test_row_adapter.py
  • plugins/nemo-evaluator/tests/integration/test_publish_to_intake.py
  • plugins/nemo-evaluator/tests/jobs/test_publication.py
  • plugins/nemo-evaluator/tests/test_sdk.py
💤 Files with no reviewable changes (1)
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/http_utils.py

Comment thread plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py Outdated
Comment thread plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py
@nv-odrulea nv-odrulea changed the title Od/model eval api publish to intake feat(evaluator): model evaluate wire publish_to_intake() to API Aug 6, 2026
@nv-odrulea
nv-odrulea changed the base branch from main to od/agent-eval-api-publishes-to-intake August 6, 2026 23:16
@github-actions github-actions Bot added the feat label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 32233/40906 78.8% 63.7%
Integration Tests 18643/38832 48.0% 20.7%

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

lgtm

Comment thread plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py Outdated
Comment thread plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
@nv-odrulea
nv-odrulea force-pushed the od/agent-eval-api-publishes-to-intake branch from 677ef46 to 9180e45 Compare August 7, 2026 20:46
Base automatically changed from od/agent-eval-api-publishes-to-intake to main August 7, 2026 21:20
Comment thread plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
@nv-odrulea
nv-odrulea force-pushed the od/model-eval-api-publish-to-intake branch from 1fbd77f to 8705a94 Compare August 8, 2026 04:07
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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 `@plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py`:
- Around line 78-80: Update the completion check in the row adapter around
AgentOutput so it tests response is None rather than response truthiness.
Preserve valid falsy JSON responses such as 0, false, [], and {} while still
returning None when both output_text and response are absent.

In `@plugins/nemo-evaluator/tests/jobs/test_publication.py`:
- Around line 517-529: Update _FakeRowEvaluator.run_sync to invoke the imported
run_sync helper around an async result-producing method, matching
_FakeEvaluator, instead of returning EvaluationResult directly. Ensure the
evaluator event loop is created and closed during the call so the publication
test exercises loop binding.
🪄 Autofix

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: 61f1cb6d-09ed-47f0-9dcb-27e1a1c79a62

📥 Commits

Reviewing files that changed from the base of the PR and between a7f67cd and 8705a94.

📒 Files selected for processing (12)
  • plugins/nemo-evaluator/openapi/openapi.yaml
  • plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/agent_spec.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/_executor.py
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/http_utils.py
  • plugins/nemo-evaluator/tests/intake/test_row_adapter.py
  • plugins/nemo-evaluator/tests/integration/test_publish_to_intake.py
  • plugins/nemo-evaluator/tests/jobs/test_publication.py
  • plugins/nemo-evaluator/tests/test_sdk.py
💤 Files with no reviewable changes (1)
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/http_utils.py
🚧 Files skipped from review as they are similar to previous changes (8)
  • plugins/nemo-evaluator/tests/test_sdk.py
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/_executor.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py
  • plugins/nemo-evaluator/tests/intake/test_row_adapter.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/agent_spec.py
  • plugins/nemo-evaluator/tests/integration/test_publish_to_intake.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py

Comment thread plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py Outdated
Comment thread plugins/nemo-evaluator/tests/jobs/test_publication.py

@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: 1

Caution

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

⚠️ Outside diff range comments (1)
plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py (1)

388-398: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not publish after queryable persistence fails.

persist_evaluate_result catches all exceptions and continues, so this publication call still runs when no queryable result record exists. This can leave Intake data without its local result record and contradicts the stated “publish after persistence succeeds” contract. Gate publication on successful persistence, or define and test the partial-success behavior.

🤖 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 `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py` around lines 388
- 398, Update the evaluate flow around persist_evaluate_result and
publish_row_eval_result so publication occurs only when queryable-result
persistence succeeds. Propagate or record the persistence failure instead of
allowing the broad exception handling to continue into publication, while
preserving the existing required-publication behavior for successful
persistence.
🤖 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 `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py`:
- Around line 238-252: The EvaluateJob republish flow must reload the persisted
run metadata instead of relying only on the in-memory result and full_result
artifact. Update the local result loading/publication path around
EvaluationResultFiles and local_result_path to read run-metadata.json and reuse
its run_id and started_at for retries; alternatively include those fields in the
primary artifact consumed by output["artifact"] and bundle_ref, while preserving
the existing Intake identity.

---

Outside diff comments:
In `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py`:
- Around line 388-398: Update the evaluate flow around persist_evaluate_result
and publish_row_eval_result so publication occurs only when queryable-result
persistence succeeds. Propagate or record the persistence failure instead of
allowing the broad exception handling to continue into publication, while
preserving the existing required-publication behavior for successful
persistence.
🪄 Autofix

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: 8c91374f-ad3c-4e80-a484-724cd1095ccd

📥 Commits

Reviewing files that changed from the base of the PR and between 8705a94 and 9c64d3e.

📒 Files selected for processing (3)
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py
  • plugins/nemo-evaluator/tests/jobs/test_publication.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/nemo-evaluator/tests/jobs/test_publication.py

Comment thread plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
@nv-odrulea
nv-odrulea enabled auto-merge August 8, 2026 04:31
@nv-odrulea
nv-odrulea added this pull request to the merge queue Aug 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 8, 2026
@nv-odrulea
nv-odrulea force-pushed the od/model-eval-api-publish-to-intake branch from a0d152e to aaa67b0 Compare August 12, 2026 20:21
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@nv-odrulea
nv-odrulea enabled auto-merge August 12, 2026 20:23
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
@nv-odrulea
nv-odrulea force-pushed the od/model-eval-api-publish-to-intake branch from aaa67b0 to b50ad05 Compare August 12, 2026 20:23

@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 `@plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py`:
- Around line 394-408: Gate the publication block around publish_row_eval_result
on successful result persistence, using the existing persistence-success state
from the exception handling near lines 375-379. When persistence fails, skip
publication (or terminate before reaching it); retain the current publication
behavior only after the queryable evaluation record is durable.

In `@plugins/nemo-evaluator/tests/jobs/test_publication.py`:
- Around line 686-695: Update test_row_agent_target_derives_its_name to execute
the publication or resolution path that derives the agent identity, rather than
only checking spec.publication is present. Assert that the resolved or published
agent name is “my-agent”, preserving the existing validation setup.
🪄 Autofix

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: 345535d0-c546-4e1d-b1d4-fc846a3910da

📥 Commits

Reviewing files that changed from the base of the PR and between d5b8821 and aaa67b0.

📒 Files selected for processing (12)
  • plugins/nemo-evaluator/openapi/openapi.yaml
  • plugins/nemo-evaluator/src/nemo_evaluator/intake/row_adapter.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/agent_spec.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/_executor.py
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/http_utils.py
  • plugins/nemo-evaluator/tests/intake/test_row_adapter.py
  • plugins/nemo-evaluator/tests/integration/test_publish_to_intake.py
  • plugins/nemo-evaluator/tests/jobs/test_publication.py
  • plugins/nemo-evaluator/tests/test_sdk.py
💤 Files with no reviewable changes (1)
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/http_utils.py
🚧 Files skipped from review as they are similar to previous changes (8)
  • plugins/nemo-evaluator/tests/intake/test_row_adapter.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication_spec.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/publication.py
  • plugins/nemo-evaluator/tests/integration/test_publish_to_intake.py
  • plugins/nemo-evaluator/openapi/openapi.yaml
  • plugins/nemo-evaluator/src/nemo_evaluator/sdk/_executor.py
  • plugins/nemo-evaluator/tests/test_sdk.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/agent_spec.py

Comment thread plugins/nemo-evaluator/src/nemo_evaluator/jobs/evaluate.py
Comment thread plugins/nemo-evaluator/tests/jobs/test_publication.py Outdated
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
@nv-odrulea
nv-odrulea added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@nv-odrulea
nv-odrulea added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 0dc78d7 Aug 12, 2026
135 of 141 checks passed
@nv-odrulea
nv-odrulea deleted the od/model-eval-api-publish-to-intake branch August 12, 2026 22:28
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.

3 participants