Skip to content

Fix/jumpstart network isolation#5833

Open
lhnealreilly wants to merge 6 commits intoaws:masterfrom
lhnealreilly:fix/jumpstart-network-isolation
Open

Fix/jumpstart network isolation#5833
lhnealreilly wants to merge 6 commits intoaws:masterfrom
lhnealreilly:fix/jumpstart-network-isolation

Conversation

@lhnealreilly
Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:
v3's ModelBuilder never applies inference_enable_network_isolation from JumpStart model spec metadata, causing all JumpStart models to deploy without network isolation (defaults to False). In v2, JumpStartModel read this from the spec and passed it to create_model().

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

lnealrei added 3 commits May 6, 2026 19:56
In v2, JumpStart models deployed with EnableNetworkIsolation=True because
the JumpStartModel class read inference_enable_network_isolation from the
model spec JSON. In v3's ModelBuilder, this field was never extracted from
the JumpStart init_kwargs or deploy_kwargs, causing all JumpStart models
to deploy without network isolation (defaulting to False).

This fix applies enable_network_isolation from the JumpStart model spec
in both code paths:
1. _build_for_jumpstart() - regular build path via get_init_kwargs()
2. from_jumpstart_config() - classmethod path via _retrieve_model_deploy_kwargs()

The user-provided value (via network= param) takes precedence.
Tests both code paths:
1. _build_for_jumpstart() - verifies enable_network_isolation is applied
   from init_kwargs and that user-set values are not overridden
2. from_jumpstart_config() - verifies enable_network_isolation is
   extracted from deploy_kwargs
Tests both code paths:
1. _build_for_jumpstart() - verifies enable_network_isolation is applied
   from init_kwargs and that user-set values are not overridden
2. from_jumpstart_config() - verifies enable_network_isolation is
   extracted from deploy_kwargs
…xture

The mock directly inherits _ModelBuilderServers without going through
ModelBuilder.__post_init__ which initializes this attribute.
evakravi
evakravi previously approved these changes May 6, 2026
Integration test builds a real SageMaker Model (falcon-7b) and verifies
EnableNetworkIsolation=True via describe_model API. No endpoint deployed.

Also adds _enable_network_isolation to MockModelBuilderServers fixture
to fix 7 pre-existing unit test failures.
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.

8 participants