Skip to content

fix: Transformer tags pydantic validation and shape compatibility - #6103

Open
wasim-builds wants to merge 3 commits into
aws:masterfrom
wasim-builds:fix/issue-6090-transformer-tags
Open

fix: Transformer tags pydantic validation and shape compatibility#6103
wasim-builds wants to merge 3 commits into
aws:masterfrom
wasim-builds:fix/issue-6090-transformer-tags

Conversation

@wasim-builds

@wasim-builds wasim-builds commented Jul 25, 2026

Copy link
Copy Markdown

Fixes #6090

Problem

Transformer.transform() has two tag-handling issues in sagemaker-core:

  1. pydantic.ValidationError (extra_forbidden) because tags/Tags are passed through to TransformJob, which does not accept extra fields.
  2. Backend rejects tags when they are shaped as [{"key": "foo", "value": "bar"}] instead of the canonical [{"Key": "foo", "Value": "bar"}].

Fix

  • Pop tags/Tags from the transformed dict before constructing TransformJob.
  • Normalize tag casing to Key/Value before calling CreateTransformJob.

Scope

sagemaker-core/src/sagemaker/core/transformer.py and sagemaker-core/src/sagemaker/core/clarify/__init__.py.

Verification

TransformJob creation now succeeds with tags in either casing, and pydantic validation no longer raises extra_forbidden.

@wasim-builds

Copy link
Copy Markdown
Author

By the way, I've really been enjoying contributing to this project! My goal is to get more involved in open source to help maintain projects and learn from great engineering teams. Is there a process or pathway for becoming a member of the aws GitHub organization? I'd love to continue helping out where I can!

@wasim-builds

Copy link
Copy Markdown
Author

Hey 👋 Just a friendly ping on this one — fixes Transformer tags pydantic validation and shape compatibility. Ready for review when you get a chance! 🙏

@wasim-builds

Copy link
Copy Markdown
Author

Hey 👋 Just a friendly bump — this fixes the Transformer tags pydantic validation error and shape compatibility issue. Ready for review whenever you have a moment! 🙏

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.

Transformer.transform() raises pydantic ValidationError ("tags: extra_forbidden") after submitting the job when tags are set

1 participant