@@ -1600,21 +1600,21 @@ def deploy(
1600
1600
if self ._base_name is not None :
1601
1601
self ._base_name = "-" .join ((self ._base_name , compiled_model_suffix ))
1602
1602
1603
- if self ._is_sharded_model and endpoint_type != EndpointType .INFERENCE_COMPONENT_BASED :
1604
- logging .warning (
1605
- "Forcing INFERENCE_COMPONENT_BASED endpoint for sharded model. ADVISORY - "
1606
- "Use INFERENCE_COMPONENT_BASED endpoints over MODEL_BASED endpoints."
1607
- )
1608
- endpoint_type = EndpointType .INFERENCE_COMPONENT_BASED
1603
+ if self ._is_sharded_model :
1604
+ if endpoint_type != EndpointType .INFERENCE_COMPONENT_BASED :
1605
+ logging .warning (
1606
+ "Forcing INFERENCE_COMPONENT_BASED endpoint for sharded model. ADVISORY - "
1607
+ "Use INFERENCE_COMPONENT_BASED endpoints over MODEL_BASED endpoints."
1608
+ )
1609
+ endpoint_type = EndpointType .INFERENCE_COMPONENT_BASED
1609
1610
1610
- if self . _is_sharded_model and self ._enable_network_isolation :
1611
- raise ValueError (
1612
- "EnableNetworkIsolation cannot be set to True since SageMaker Fast Model "
1613
- "Loading of model requires network access."
1614
- )
1611
+ if self ._enable_network_isolation :
1612
+ raise ValueError (
1613
+ "EnableNetworkIsolation cannot be set to True since SageMaker Fast Model "
1614
+ "Loading of model requires network access."
1615
+ )
1615
1616
1616
- if self ._is_sharded_model :
1617
- if resources .num_cpus and resources .num_cpus > 0 :
1617
+ if resources and resources .num_cpus and resources .num_cpus > 0 :
1618
1618
logger .warning (
1619
1619
"NumberOfCpuCoresRequired should be 0 for the best experience with SageMaker "
1620
1620
"Fast Model Loading. Configure by setting `num_cpus` to 0 in `resources`."
0 commit comments