Repository navigation
test(mlops): add prompt field to DPO preference integ dataset - #6553
rsareddy0329 wants to merge 1 commit into
Conversation
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.
There was a problem hiding this comment.
🤖 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.
What
Adds the required
promptfield to each record insagemaker-mlops/tests/integ/data/v3_trainer/preference_train.jsonl, converting it to thedocumented 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 Mastercanary:Root cause is external JumpStart Hub drift, not an SDK change:
v2.0.6published to JumpStart cache2.17.0formeta-textgeneration-llama-3-2-1b-instructgoes liveThe republished training container now enforces the
promptcolumn the recipe maps viadata.prompt_key. The fixture only carriedchosen/rejected. The only SDK commit merged in thatwindow was an unrelated codegen/codestyle fix, so no SDK code caused this.
Not a customer-facing change
prompt+chosen+rejectedis the format the DPO example notebook documents and the schema theSDK's own
sagemaker-train/.../ai_registry/dataset_validation.py::validate_dpoenforces (it requiresall three). This only realigns a stale test fixture with the already-documented, already-validated
contract.
Validation
chosen/rejected = assistant completions). The exact shape is defined by the verl
DPODataConfigin 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.