@@ -514,12 +514,13 @@ def _resolve_model_artifact_uri(self) -> Optional[str]:
514514 fine-tuned model.
515515
516516 Returns:
517- Optional[str]: S3 URI to model artifacts, or None for LORA adapters
517+ Optional[str]: S3 URI to model artifacts, or None when not needed
518518
519519 Logic:
520520 - For LORA adapters: Returns None (adapter weights are separate)
521+ - For fine-tuned models: Returns None (model data is handled by the recipe/container)
521522 - For base models: Uses HostingArtifactUri from JumpStart hub metadata
522- - For full fine-tuned models: Uses ModelPackage artifact location
523+ - For non-model-customization: Returns None
523524
524525 Raises:
525526 ValueError: If model package or hub metadata is unavailable when needed
@@ -534,22 +535,23 @@ def _resolve_model_artifact_uri(self) -> Optional[str]:
534535 if self ._is_model_customization ():
535536 model_package = self ._fetch_model_package ()
536537 if model_package :
537- # Check if this is a full fine-tuned model (has its own artifacts)
538538 if (hasattr (model_package , 'inference_specification' ) and
539539 model_package .inference_specification and
540540 hasattr (model_package .inference_specification , 'containers' ) and
541541 model_package .inference_specification .containers ):
542542
543543 container = model_package .inference_specification .containers [0 ]
544544
545- # If container has model_data_source, use it (full fine-tuned model)
545+ # For fine-tuned models (have model_data_source), return None.
546+ # The model data is handled by the recipe/container configuration,
547+ # not via artifact_url in CreateInferenceComponent.
546548 if (hasattr (container , 'model_data_source' ) and
547549 container .model_data_source and
548550 hasattr (container .model_data_source , 's3_data_source' ) and
549551 container .model_data_source .s3_data_source ):
550- return container . model_data_source . s3_data_source . s3_uri
552+ return None
551553
552- # Otherwise, this is a base model - get HostingArtifactUri from JumpStart
554+ # For base models, get HostingArtifactUri from JumpStart
553555 if hasattr (container , 'base_model' ) and container .base_model :
554556 try :
555557 hub_document = self ._fetch_hub_document_for_custom_model ()
@@ -570,7 +572,6 @@ def _resolve_model_artifact_uri(self) -> Optional[str]:
570572 return None
571573
572574 # For non-model-customization deployments, return None
573- # (artifact handling is done differently for those cases)
574575 return None
575576
576577 def _infer_instance_type_from_jumpstart (self ) -> str :
0 commit comments