Skip to content

[mtrl] Fix undefined STAGE in S3_TRAINING_DATA path - #6134

Merged
aviruthen merged 1 commit into
aws:masterfrom
Hannah14295:fix/mtrl-notebook-stage-s3-path
Jul 30, 2026
Merged

[mtrl] Fix undefined STAGE in S3_TRAINING_DATA path#6134
aviruthen merged 1 commit into
aws:masterfrom
Hannah14295:fix/mtrl-notebook-stage-s3-path

Conversation

@Hannah14295

Copy link
Copy Markdown
Contributor

Issue

The 3rd code cell of v3-examples/model-customization-examples/mtrl_finetuning_example_notebook_v3_prod.ipynb fails to execute with NameError: name 'STAGE' is not defined.

The cell built the training-data path from an f-string referencing an undefined STAGE variable and an internal -rftjob-input bucket pattern:

S3_TRAINING_DATA = f"s3://{REGION}-{CUSTOMER_ACCOUNT}-{STAGE}-rftjob-input/test-data/prompts/math-100-parquet/"

REGION and CUSTOMER_ACCOUNT are defined earlier in the notebook, but STAGE is not — a leftover from when MTRL was tested internally in gamma/prod. An SA following the MTRL best-practices blog and this notebook hit this error.

Fix

Replace the internal STAGE-based path with a customer-facing placeholder S3 URI, matching the convention already used in the sibling sft_finetuning_example_notebook_pysdk_prod_v3.ipynb:

S3_TRAINING_DATA = "s3://<your-bucket>/<path-to-your-training-data>/"  # TODO: replace with your training data S3 URI

Customers (and the notebook test engine, which substitutes a real dataset S3 URI) can now fill in their own dataset path.

Notes

…lder

The 3rd cell of v3-examples/model-customization-examples/
mtrl_finetuning_example_notebook_v3_prod.ipynb set S3_TRAINING_DATA
using an f-string that referenced an undefined STAGE variable and an
internal `-rftjob-input` bucket pattern left over from when MTRL was
tested in gamma/prod. Executing the cell raised
`NameError: name 'STAGE' is not defined`.

Replace it with a customer-facing placeholder S3 URI, consistent with
the sibling sft_finetuning notebook, so users (and the notebook test
engine) can substitute their own dataset path. Mirrors the fix made to
the same notebook in aws/amazon-sagemaker-examples.
@aviruthen
aviruthen merged commit 136706e into aws:master Jul 30, 2026
6 checks 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