Uh oh!
There was an error while loading. Please reload this page.
fix: propagate user-supplied tags to created resources - #6167
Conversation
Claude finished @rohangujarathi's task in 5m 27s —— View job PR Review: propagate user-supplied tags to created resources
This is a solid, well-scoped fix — the intent (accept-but-drop → accept-and-forward) is clear and consistently applied, and each change is backed by a test. A few things worth a look before merge.
Correctness1. Inconsistent tag key-casing between evaluator paths (worth flagging) —
Net effect: a user who passes the documented lowercase tag form (as the new Minor / non-blocking2.
3. Duplicate tags not de-duped — trainers (e.g. TestsGood coverage on the fixed paths (Nova deploy, SFT trainer merge +
Overall the change is correct for the majority of paths and the approach is clean; finding #1 is the one I'd resolve (or explicitly confirm the MTRL tag format expectation) before merge. |
5b5ad11 to
ef9999eCompareClaude finished @rohangujarathi's task in 6m 17s —— View job PR Review: propagate user-supplied tags to created resources
The change is clean and consistently applied: every accept-but-drop path now forwards I verified the potentially risky spots and they hold up:
Minor / non-blocking
Test coverageStrong on the fixed paths — Nova deploy (merge + dict-form + no-tags), SFT trainer (merge +
Overall: correct, well-tested, and the one blocking concern from the prior pass is now fixed. Nothing here blocks merge. |
Claude finished @rohangujarathi's task in 2m 28s —— View job PR Review: propagate user-supplied tags to created resources
Clean, well-scoped fix. The accept-but-drop → accept-and-forward pattern is applied consistently across every path (trainers, evaluators, ModelBuilder deploy), and each fixed path is backed by a test. I verified the spots that could bite and they hold up.
Verified correct
Minor / non-blocking
Test coverageStrong on the fixed paths. Two changed lines remain unexercised (both low priority):
Overall: correct, well-tested, and the one prior blocking concern is resolved. Nothing here blocks merge. |
Tags passed to the trainer and evaluator classes were accepted but never reached the resources they create, so they could not be used for tag-based resource association. - Trainers (SFT, DPO, RLVR, RLAIF, MultiTurnRL): the serverless train() path built its tag list from the JumpStart tags only and discarded self.tags. MultiTurnRLTrainer additionally computed tags and then never passed them to Job.create(). - BaseTrainer._train_serverful_smtj() did not forward tags to ModelTrainer.from_recipe(). - BaseEvaluator had no tags field at all; add one and merge it into the pipeline tags. - MultiTurnRLEvaluator passed only the evaluation discovery tag to CreatePipeline and dropped customer tags. The create APIs are typed List[Tag] and validated by pydantic, which coerces plain key/value dicts and accepts Tag objects, so the merged tag lists are passed through as-is. MultiTurnRLEvaluator is the exception: it calls CreatePipeline through raw boto3 and also renders tags into the pipeline definition, both of which require the capitalized Key/Value form, so its tags are normalized locally.
ef9999e to
0d811b2CompareClaude finished @rohangujarathi's task in 1m 16s —— View job PR Review: propagate user-supplied tags to created resources
Clean, well-scoped fix. Every accept-but-drop path now forwards
Verified correct
Minor / non-blocking
Test coverageStrong on the fixed paths — SFT trainer (merge + Gaps, both low priority:
Overall: correct and well-tested for the paths in this diff. Nothing here blocks merge — just confirm the ModelBuilder changes weren't unintentionally dropped from the changeset. |
Claude finished @rsareddy0329's task in 2m 4s —— View job PR Review: propagate user-supplied tags to created resources
Clean, well-scoped fix. Every accept-but-drop path now forwards Verified correct
Minor / non-blocking
Test coverageStrong on the fixed paths — SFT trainer (merge + Two low-priority gaps remain:
Overall: correct and well-tested for the paths in this diff. Nothing here blocks merge — the prior blocking casing concern is resolved. |
Uh oh!
There was an error while loading. Please reload this page.
Tags passed to the trainer and evaluator classes were accepted but never reached the resources they create.
The create APIs are typed List[Tag] and validated by pydantic, which coerces plain key/value dicts and accepts Tag objects, so the merged tag lists are passed through as-is. MultiTurnRLEvaluator is the exception: it calls CreatePipeline through raw boto3 and also renders tags into the pipeline definition, both of which require the capitalized Key/Value form, so its tags are normalized locally.
Testing
13 new unit tests: 2 for trainer tag merging, 2 for BaseEvaluator.tags reaching the pipeline execution, 7 for the MultiTurnRLEvaluator casing conversion (including the raw boto3 CreatePipeline payload shape), and 2 for _create_evaluation_pipeline accepting either casing.
Verified against a pristine master checkout in an identical environment: 39 pre-existing sagemaker-train failures on both sides, identical test-name sets, zero new.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.