Skip to content

fix(evaluator): emit evaluation_context in publish-to-intake#742

Merged
shanaiabuggy merged 3 commits into
mainfrom
sbuggy/evaluator-publish-evaluation-context
Jul 17, 2026
Merged

fix(evaluator): emit evaluation_context in publish-to-intake#742
shanaiabuggy merged 3 commits into
mainfrom
sbuggy/evaluator-publish-evaluation-context

Conversation

@shanaiabuggy

@shanaiabuggy shanaiabuggy commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The evaluator's publish-to-intake path (added in #456) still emits the deprecated experiment_context on ATIF ingest. As part of the Experiment → Evaluation rename, intake deprecated experiment_context in favor of evaluation_context. This migrates the boundary mapping to the canonical shape.

Per mapping.py's own design note ("a later rename is a one-file change"), the wire migration lives entirely in that module:

  • ExperimentContextParamEvaluationContextParam
  • run_task_to_experiment_contextrun_task_to_evaluation_context, now emitting {"evaluation_id": …, "test_case_id": …} under the "evaluation_context" ATIF body key
  • tests updated to match (unit test_mapping.py/test_publish.py + the integration trace read)

Left for the evaluator team

The public publish_to_intake(experiment_id=…) parameter and PublishReport.experiment_id field are intentionally unchanged — renaming that external surface to evaluation_id is your call. The value already flows through to evaluation_context.evaluation_id, so functionally this is complete.

Not urgent / non-breaking

experiment_context still works as a deprecated alias in intake (evaluation_context takes precedence when both are sent), so publish isn't broken today — this is a forward migration before the alias is removed. No SDK version bump needed: the plugin uses the in-repo workspace SDK, which already exposes EvaluationContextParam.

Validation

  • In-repo SDK confirmed to export EvaluationContextParam (TypedDict: evaluation_id, test_case_id).
  • mapping.py compiles; no stale experiment_context/ExperimentContextParam references remain in the changed files.
  • Unit + integration test assertions updated in lockstep. (Full suite runs in CI — the plugin needs the whole workspace built.)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the evaluation data sent to Intake to use evaluation context.
    • Evaluation records now include the evaluation ID and test case ID for clearer traceability.
    • Updated published trajectory and score metadata to consistently reflect the new evaluation context.
    • Improved integration coverage to verify evaluation context is preserved end-to-end through the publishing flow.

The intake ingest `experiment_context` field was deprecated in favor of
`evaluation_context` as part of the Experiment -> Evaluation rename. Migrate the
evaluator's publish-to-intake mapping to the canonical shape:

- mapping.py: ExperimentContextParam -> EvaluationContextParam;
  run_task_to_experiment_context -> run_task_to_evaluation_context, emitting
  {"evaluation_id", "test_case_id"} under the "evaluation_context" ATIF body key.
- tests updated to match (unit + integration trace read).

The public `publish_to_intake(experiment_id=...)` parameter is intentionally left
unchanged for the evaluator team to rename separately. `experiment_context` still
works as a deprecated alias, so this is a forward migration, not a break-fix.

Signed-off-by: shanaiabuggy <[email protected]>
@shanaiabuggy
shanaiabuggy requested review from a team as code owners July 16, 2026 21:22
@github-actions github-actions Bot added the fix label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: da3ddba1-7c47-4c26-88cb-97e7cbed84df

📥 Commits

Reviewing files that changed from the base of the PR and between bdaf12f and 0686ccb.

📒 Files selected for processing (1)
  • plugins/nemo-evaluator/src/nemo_evaluator/intake/mapping.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/nemo-evaluator/src/nemo_evaluator/intake/mapping.py

📝 Walkthrough

Walkthrough

The intake mapping replaces experiment_context with evaluation_context, using evaluation_id and test_case_id. Unit, publishing, and integration tests validate the updated payload and trace metadata.

Changes

Evaluation context migration

Layer / File(s) Summary
Update intake context mapping
plugins/nemo-evaluator/src/nemo_evaluator/intake/mapping.py
Replaces the experiment context type and helper, then emits evaluation_context with evaluation_id and test_case_id.
Validate evaluation context propagation
plugins/nemo-evaluator/tests/intake/test_mapping.py, plugins/nemo-evaluator/tests/intake/test_publish.py, plugins/nemo-evaluator/tests/integration/test_publish_to_intake.py
Updates unit, publish, and round-trip assertions to verify evaluation context payloads and trace metadata.

Possibly related PRs

🚥 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 accurately summarizes the main change: emitting evaluation_context in publish-to-intake.
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 sbuggy/evaluator-publish-evaluation-context

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 25533/32734 78.0% 62.6%
Integration Tests 14731/31383 46.9% 19.2%

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

Thanks for this @shanaiabuggy ! I'll follow up with the experiment_id -> evaluation_id swap once this lands.

@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit b7ab493 Jul 17, 2026
58 checks passed
@shanaiabuggy
shanaiabuggy deleted the sbuggy/evaluator-publish-evaluation-context branch July 17, 2026 16:02
soluwalana pushed a commit that referenced this pull request Jul 17, 2026
* fix(evaluator): emit evaluation_context in publish-to-intake

The intake ingest `experiment_context` field was deprecated in favor of
`evaluation_context` as part of the Experiment -> Evaluation rename. Migrate the
evaluator's publish-to-intake mapping to the canonical shape:

- mapping.py: ExperimentContextParam -> EvaluationContextParam;
  run_task_to_experiment_context -> run_task_to_evaluation_context, emitting
  {"evaluation_id", "test_case_id"} under the "evaluation_context" ATIF body key.
- tests updated to match (unit + integration trace read).

The public `publish_to_intake(experiment_id=...)` parameter is intentionally left
unchanged for the evaluator team to rename separately. `experiment_context` still
works as a deprecated alias, so this is a forward migration, not a break-fix.

Signed-off-by: shanaiabuggy <[email protected]>

* lint

Signed-off-by: shanaiabuggy <[email protected]>

---------

Signed-off-by: shanaiabuggy <[email protected]>
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