[Docs] Add documentation for show_metrics(), stream_logs(), and job notification setup#6065
Merged
mujtaba1747 merged 3 commits intoJul 21, 2026
Conversation
amazeAmazing
approved these changes
Jul 20, 2026
|
|
||
| # After a kernel restart, use the standalone function with job name | ||
| from sagemaker.train import plot_training_metrics | ||
| plot_training_metrics("my-sft-job-20260101195119") |
Contributor
There was a problem hiding this comment.
nit: maybe a more basic job name e.g. my-sft-job
mujtaba1747
reviewed
Jul 20, 2026
| df = trainer.show_metrics(metrics=["training_loss", "lr"]) | ||
|
|
||
| # Filter by step range | ||
| df = trainer.show_metrics(starting_step=20, ending_step=100) |
Collaborator
There was a problem hiding this comment.
is show_metrics supported in serverless?
mujtaba1747
reviewed
Jul 20, 2026
| job = trainer.train(wait=False) | ||
|
|
||
| # Stream logs directly to the terminal (blocking) | ||
| trainer.stream_logs() |
Collaborator
There was a problem hiding this comment.
And is stream_logs() supported in serverless?
Contributor
Author
There was a problem hiding this comment.
They are both supported for serverless, but we don't have an equivalent finetuning_serverless.rst. Syncing offline to figure out the best place to put this information.
mujtaba1747
approved these changes
Jul 21, 2026
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 #, if available: N/A
Summary
Adds documentation for
show_metrics(),stream_logs(), and job notifications to the existing Sphinx RST pages under model customization.Changes
docs/model_customization/model_customization.rstdocs/model_customization/finetuning_serverful.rstshow_metrics()andstream_logs()examples for SMTJ computedocs/model_customization/finetuning_hyperpod.rstshow_metrics()andstream_logs()examples for HyperPod compute, including Ctrl+C behavior noteTesting
make htmlindocs/builds without errorsBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.