Skip to content

fix: resolve Nova model artifacts via TrainingJob.get() in bedrock-modelbuilder-deployment example - #6091

Merged
lucasjia-aws merged 2 commits into
aws:masterfrom
Hannah14295:fix/bedrock-modelbuilder-nova-model-artifacts
Jul 23, 2026
Merged

lucasjia-aws merged 2 commits into
aws:masterfrom
Hannah14295:fix/bedrock-modelbuilder-nova-model-artifacts

Conversation

@Hannah14295

Copy link
Copy Markdown
Contributor

Issue

In v3-examples/model-customization-examples/bedrock-modelbuilder-deployment.ipynb, after sft_trainer.train(wait=True) the notebook prints:

print(f"Checkpoint: {sft_trainer._latest_training_job.model_artifacts.s3_model_artifacts}")

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: DescribeTrainingJob returns ModelArtifacts: null for Nova (artifacts go to the managed escrow bucket), so model_artifacts is Unassigned. The SDK synthesizes model_artifacts from OutputDataConfig — but only inside TrainingJob.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 earlier TrainingJob.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.)

hrehard 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).
@lucasjia-aws
lucasjia-aws merged commit f8d3d99 into aws:master Jul 23, 2026
6 checks passed

This branch was previously deployed

1 inactive deployment
manual-approval — 98dac98b Deployed Jul 23, 2026 by Hannah14295 via wait-for-approval #1096
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