Skip to content

test(mlops): add prompt field to DPO preference integ dataset - #6553

Open
rsareddy0329 wants to merge 1 commit into
aws:masterfrom
rsareddy0329:fix/dpo-preference-dataset-add-prompt
Open

rsareddy0329 wants to merge 1 commit into
aws:masterfrom
rsareddy0329:fix/dpo-preference-dataset-add-prompt

Conversation

@rsareddy0329

Copy link
Copy Markdown
Contributor

What

Adds the required prompt field to each record in
sagemaker-mlops/tests/integ/data/v3_trainer/preference_train.jsonl, converting it to the
documented DPO schema prompt + chosen + rejected (prompt = the user turn;
chosen/rejected = the assistant completions).

Why

test_dpo_trainer_pipeline_create_and_execute (tests/integ/workflow/test_v3_trainer_pipeline.py)
started failing on the 2026-10-29 CI Health V3 Master canary:

DPOFineTune: ClientError: Dataset is missing required columns: 'prompt' (set via data.prompt_key).
Available columns: ['chosen', 'rejected']

Root cause is external JumpStart Hub drift, not an SDK change:

Event Time (UTC)
DPO recipe v2.0.6 published to JumpStart cache 2026-10-28 05:29
Hub content 2.17.0 for meta-textgeneration-llama-3-2-1b-instruct goes live 2026-10-28 12:37
CI Health canary, DPO PASSED (prior hub content) 2026-10-28 07:04
CI Health canary, DPO FAILED (now on 2.17.0) 2026-10-29 07:04

The republished training container now enforces the prompt column the recipe maps via
data.prompt_key. The fixture only carried chosen/rejected. The only SDK commit merged in that
window was an unrelated codegen/codestyle fix, so no SDK code caused this.

Not a customer-facing change

prompt + chosen + rejected is the format the DPO example notebook documents and the schema the
SDK's own sagemaker-train/.../ai_registry/dataset_validation.py::validate_dpo enforces (it requires
all three). This only realigns a stale test fixture with the already-documented, already-validated
contract.

Validation

  • DPO integ run to confirm the container accepts the conversational shape (prompt = user turn,
    chosen/rejected = assistant completions). The exact shape is defined by the verl DPODataConfig
    in the 2.17.0 container; can switch to plain strings if the container expects that instead.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

test_dpo_trainer_pipeline_create_and_execute began failing on the
2026-10-29 CI Health V3 Master canary with:
  DPOFineTune: Dataset is missing required columns: 'prompt'
  Available columns: ['chosen', 'rejected']

Root cause is external JumpStart Hub drift, not an SDK change. The
SageMakerPublicHub model meta-textgeneration-llama-3-2-1b-instruct was
republished (hub content 2.17.0, 2026-10-28 12:37 UTC, DPO recipe
v2.0.6) with a training container that now enforces the prompt column
the recipe maps via data.prompt_key. The preference_train.jsonl fixture
only carried chosen/rejected, so it last passed on the 2026-10-28 canary
and failed on 2026-10-29. The only SDK commit in that window was an
unrelated codegen/codestyle fix.

prompt+chosen+rejected is the documented DPO schema (DPO example
notebook) and the format the SDK's own ai_registry.validate_dpo
enforces, so this is a stale-fixture fix, not a customer-facing change.
Lift the shared user turn into prompt; chosen/rejected now hold the
assistant completions.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI code review

This PR updates a single integ-test fixture (preference_train.jsonl) to add a prompt field to each DPO record, splitting the previous chosen/rejected conversational turns into prompt (user turn) + chosen/rejected (assistant completions). The fixture is uploaded verbatim to S3 and consumed by the training container in test_dpo_trainer_pipeline_create_and_execute; it does not pass through the SDK's validate_dpo, so the change is self-consistent. The edit is mechanical and consistent across all 20 rows, and it realigns the data with the container's reported required columns. The change looks correct; I have no blocking findings, only noting that the PR author's own checklist flags that the conversational list shape (vs. plain strings) still needs confirmation via an actual DPO integ run.

Reviewed commit fc55730. Automated review; verify before acting.

This branch was successfully deployed

1 active deployment
auto-approve — fc55730e Deployed Oct 30, 2026 by rsareddy0329 via wait-for-approval #1883
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant