Repository navigation
fix: resolve Nova model artifacts via TrainingJob.get() in bedrock-modelbuilder-deployment example - #6091
Merged
lucasjia-aws merged 2 commits intoJul 23, 2026
Conversation
added 2 commits
July 23, 2026 09:37
…ploy example In bedrock-modelbuilder-deployment.ipynb, after sft_trainer.train(wait=True) the example printed sft_trainer._latest_training_job.model_artifacts.s3_model_artifacts. For Nova training jobs the DescribeTrainingJob API returns no ModelArtifacts, and the trainer's cached _latest_training_job is not re-fetched -- so model_artifacts stays Unassigned and the cell raises 'AttributeError: Unassigned object has no attribute s3_model_artifacts', halting the notebook before deploy. Re-fetch the completed job with TrainingJob.get(), which synthesizes the artifacts path from output_data_config (same pattern the earlier get() cell already uses).
Hannah14295
temporarily deployed
to
manual-approval
July 23, 2026 16:48 — with
GitHub Actions
Inactive
aviruthen
approved these changes
Jul 23, 2026
lucasjia-aws
approved these changes
Jul 23, 2026
This branch was previously deployed
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.
Issue
In
v3-examples/model-customization-examples/bedrock-modelbuilder-deployment.ipynb, aftersft_trainer.train(wait=True)the notebook prints:For Nova training jobs this raises
AttributeError: 'Unassigned' object has no attribute 's3_model_artifacts', halting the notebook before the deploy step. Confirmed against a real completed job:DescribeTrainingJobreturnsModelArtifacts: nullfor Nova (artifacts go to the managed escrow bucket), somodel_artifactsisUnassigned. The SDK synthesizesmodel_artifactsfromOutputDataConfig— but only insideTrainingJob.get(), not on the trainer's cached_latest_training_job.Fix
Re-fetch the completed job with
TrainingJob.get(...)(which triggers the synthesis) and print from that — the same pattern the earlierTrainingJob.get()cell in this notebook already uses. Minimal change to the one cell.(Note: this unblocks the subsequent
BedrockModelBuilder(model=sft_trainer).deploy(...)cell, which relies on the trainer object directly.)