Skip to content

fix(jumpstart): ignore unknown fields in HubContentDocument to handle hub schema additions#5849

Merged
mollyheamazon merged 1 commit into
aws:masterfrom
mollyheamazon:master
May 12, 2026
Merged

fix(jumpstart): ignore unknown fields in HubContentDocument to handle hub schema additions#5849
mollyheamazon merged 1 commit into
aws:masterfrom
mollyheamazon:master

Conversation

@mollyheamazon
Copy link
Copy Markdown
Contributor

@mollyheamazon mollyheamazon commented May 12, 2026

The SageMakerPublicHub added new metadata fields (InputModalities, OutputModalities, ModelAccess, Languages, ModelSize, ContextWindow, MlFramework) to model hub content
documents. HubContentDocument had no explicit model_config, causing Pydantic to reject
these unknown fields with a ValidationError and breaking test_all_hub_content_documents.

Fix: add model_config = ConfigDict(extra="ignore") to HubContentDocument so the model
is forward-compatible with hub schema additions without requiring SDK changes each time.

Failed test: FAILED tests/integ/jumpstart/test_model.py::test_all_hub_content_documents
https://tiny.amazon.com/gmlhcs1i/IsenLink

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mollyheamazon mollyheamazon marked this pull request as ready for review May 12, 2026 20:38
@mollyheamazon mollyheamazon merged commit 721a49f into aws:master May 12, 2026
17 of 23 checks passed
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.

2 participants