Skip to content

Update error message on ModelBuilder when deploying from S3 checkpoint - #6111

Merged
zhaoqizqwang merged 3 commits into
aws:master-nova-follow-upsfrom
zhaoqizqwang:zhaoqi-nova-fix
Jul 28, 2026
Merged

Update error message on ModelBuilder when deploying from S3 checkpoint#6111
zhaoqizqwang merged 3 commits into
aws:master-nova-follow-upsfrom
zhaoqizqwang:zhaoqi-nova-fix

Conversation

@zhaoqizqwang

Copy link
Copy Markdown
Collaborator

Update error message on ModelBuilder when deploying from S3 checkpoint

  • Logging training job name when calling ModelTrainer.train()
  • Updating error message when missing required fields such as image_uri, base_job_name in ModelBuilder

# Validate required fields that would normally be auto-resolved.
missing_fields = []
if not self.image_uri:
missing_fields.append("image_uri")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need the image uri for OSS serverful SMTJ as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would apply to both Nova and non-Nova models. I have updated the code in new commit to find image_uri from Hub based using base_model_name

)

# If user already provided image_uri, skip hub resolution
if self.image_uri:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go before base_model_name. If the user already has an image uri, they do not need a base_model_name for resolution.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base_model_name validation is still required. I just moved it out of this util function

hub_content_name = model_package.inference_specification.containers[0].base_model.hub_content_name
else:
# No model package (e.g. SMTJ trainer): resolve from base_model_name
from sagemaker.train.common_utils.model_aliases import normalize_model_name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a top level import

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@zhaoqizqwang
zhaoqizqwang merged commit f1aaedd into aws:master-nova-follow-ups Jul 28, 2026
1 check 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.

3 participants