Skip to content

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

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

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

Conversation

@Hannah14295

Copy link
Copy Markdown
Contributor

Issue

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

The cell set the training-data path using 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 — it was 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

  • Single-line change; notebook validated as well-formed JSON.
  • Targets the NotebookTestEngine branch so PR checks run E2E.

…lder

The 3rd cell of 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 convention used in the sibling sft_finetuning notebook, so users
(and the notebook test engine) can substitute their own dataset path.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Hannah14295
Hannah14295 deployed to manual-approval July 30, 2026 20:39 — with GitHub Actions Active
@aviruthen
aviruthen merged commit b47a870 into aws:NotebookTestEngine Jul 30, 2026
3 of 4 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