You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,25 @@ Here is an end to end example of how to use a SageMaker Estimator:
170
170
# Tears down the SageMaker endpoint
171
171
mxnet_estimator.delete_endpoint()
172
172
173
+
Training Metrics
174
+
~~~~~~~~~~~~~~~~
175
+
The SageMaker Python SDK allows you to specify a name and a regular expression for metrics you want to track for training.
176
+
A regular expression (regex) matches what is in the training algorithm logs, like a search function.
177
+
Here is an example of how to define metrics:
178
+
179
+
.. code:: python
180
+
181
+
# Configure an BYO Estimator with metric definitions (no training happens yet)
182
+
byo_estimator = Estimator(image_name=image_name,
183
+
role='SageMakerRole', train_instance_count=1,
184
+
train_instance_type='ml.c4.xlarge',
185
+
sagemaker_session=sagemaker_session,
186
+
metric_definitions=[{'Name': 'test:msd', 'Regex': '#quality_metric: host=\S+, test msd <loss>=(\S+)'},
187
+
{'Name': 'test:ssd', 'Regex': '#quality_metric: host=\S+, test ssd <loss>=(\S+)'}])
188
+
189
+
All Amazon SageMaker algorithms come with built-in support for metrics.
190
+
You can go to `the AWS documentation <https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html>`__ for more details about built-in metrics of each Amazon SageMaker algorithm.
0 commit comments