resolve alt config resolution for jumpstart models#5563
Merged
Conversation
mufaddal-rohawala
approved these changes
Feb 20, 2026
Evan-W-ang
added a commit
to Evan-W-ang/sagemaker-python-sdk
that referenced
this pull request
Jun 8, 2026
Failing mlops test is unrelated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(e.g. lmi) instead of the user-specified config (e.g. lmi-optimized)
Problem
When deploying a JumpStart model with inference_config_name="lmi-optimized" via ModelBuilder.from_jumpstart_config(), the endpoint used environment
variables from the default lmi config instead of lmi-optimized.
from_jumpstart_config() correctly stores the config name on self.config_name, but _build_for_jumpstart() in model_builder_servers.py never passed it
to get_init_kwargs(). With config_name=None, _add_config_name_to_init_kwargs() falls back to get_top_ranked_config_name(), which returns the default
config.
Fix
Pass config_name=getattr(self, 'config_name', None) to the get_init_kwargs() call in _build_for_jumpstart().