Skip to content

Fix base_model_arn construction to use private hub when SAGEMAKER_HUB_NAME is set#5836

Merged
aviruthen merged 1 commit intoaws:masterfrom
mollyheamazon:master
May 7, 2026
Merged

Fix base_model_arn construction to use private hub when SAGEMAKER_HUB_NAME is set#5836
aviruthen merged 1 commit intoaws:masterfrom
mollyheamazon:master

Conversation

@mollyheamazon
Copy link
Copy Markdown
Contributor

Issue

When a model package doesn't have hub_content_arn in its container metadata, model_resolution.py falls back to constructing the ARN from hub_content_name and hub_content_version. The fallback hardcoded SageMakerPublicHub as the hub name, causing eval jobs to fail with DownstreamServiceUnavailable when the base model exists only in a private hub.

Fix

use SAGEMAKER_HUB_NAME env var (already used throughout the SDK for hub resolution) to determine the hub name and account in the fallback ARN construction. Falls back to SageMakerPublicHub with aws account when the env var is not set, preserving existing behavior for public hub models.

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 7, 2026 00:55
@aviruthen
Copy link
Copy Markdown
Collaborator

Failing integ tests pass on CodeBuild: sagemaker-python-sdk-ci-sagemaker-mlops-integ-tests:7cb7850a-fb3e-4ea9-bf7e-3886f0e6ff40

Run failing tests based on PR check sagemaker-python-sdk-ci-sagemaker-mlops-integ-tests:0ef18d13-f532-426c-a787-7909617ae5bf (build 689) where only these two tests below failed:

tests/integ/test_hyperparameter_tuning.py::test_hyperparameter_tuning_e2e PASSED [ 50%]
tests/integ/test_pipeline_train_registry.py::test_pipeline_with_train_and_registry PASSED [100%]

@aviruthen aviruthen merged commit 7ff67d5 into aws:master May 7, 2026
30 of 44 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