Skip to content

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

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

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
Contributor

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
Contributor 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
Contributor 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
Contributor 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! 🙏

@wasim-builds

Copy link
Copy Markdown
Contributor Author

Greetings maintainers,

Following up on this proposed change (fix: Transformer tags pydantic validation and shape compatibility) in aws/sagemaker-python-sdk. Working on Amazon SageMaker Python SDK machine learning and model deployment pipelines has been a great experience, and I am very keen to continue contributing to aws/sagemaker-python-sdk.

I am also open to collaborating on a contract/freelance basis, discussing full-time opportunities, or joining the organization/team.

You can view my background and other open-source contributions at https://github.com/wasim-builds.

@mohamedzeidan2021

Copy link
Copy Markdown
Collaborator

Issue has been closed. Please reopen if you have any concerns. Thanks

This branch had an error being deployed

1 failed deployment
manual-approval — 2c6b9734 Deployed Jul 29, 2026 by wasim-builds via wait-for-approval #1459
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

2 participants