Skip to content

Commit 9cd35fb

Browse files
authored
Merge branch 'master' into tf-script-mode
2 parents 8c7d644 + 11d3fcf commit 9cd35fb

File tree

5 files changed

+39
-40
lines changed

5 files changed

+39
-40
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ CHANGELOG
33
=========
44

55
1.14.3-dev
6-
=====
6+
======
77

8+
* bug-fix: Changes to use correct S3 bucket and time range for dataframes in TrainingJobAnalytics.
89
* bug-fix: Local Mode: correctly handle the case where the model output folder doesn't exist yet
10+
* doc-fix: Fix typos in tensorflow serving documentation
11+
* doc-fix: Add estimator base classes to API docs
912

1013
1.14.2
11-
=====
14+
======
1215

1316
* bug-fix: support ``CustomAttributes`` argument in local mode ``invoke_endpoint`` requests
1417
* enhancement: add ``content_type`` parameter to ``sagemaker.tensorflow.serving.Predictor``
@@ -22,7 +25,7 @@ CHANGELOG
2225
* enhancement: Session: remove hardcoded 'training' from job status error message
2326
* bug-fix: Updated Cloudwatch namespace for metrics in TrainingJobsAnalytics
2427
* bug-fix: Changes to use correct s3 bucket and time range for dataframes in TrainingJobAnalytics.
25-
28+
* enhancement: Remove MetricDefinition lookup via tuning job in TrainingJobAnalytics
2629

2730
1.14.1
2831
======

doc/estimators.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
Estimators
2-
--------------------
2+
----------
33

44
A high level interface for SageMaker training
55

6+
.. autoclass:: sagemaker.estimator.EstimatorBase
7+
:members:
8+
:undoc-members:
9+
:show-inheritance:
10+
:inherited-members:
11+
612
.. autoclass:: sagemaker.estimator.Estimator
713
:members:
814
:undoc-members:
915
:show-inheritance:
1016
:inherited-members:
17+
18+
.. autoclass:: sagemaker.estimator.Framework
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
:inherited-members:

src/sagemaker/analytics.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from six import with_metaclass
2121

2222
from sagemaker.session import Session
23-
from sagemaker.utils import DeferredError, extract_name_from_job_arn
23+
from sagemaker.utils import DeferredError
2424

2525
try:
2626
import pandas as pd
@@ -310,18 +310,9 @@ def _add_single_metric(self, timestamp, metric_name, value):
310310
def _metric_names_for_training_job(self):
311311
"""Helper method to discover the metrics defined for a training job.
312312
"""
313-
# First look up the tuning job
314313
training_description = self._sage_client.describe_training_job(TrainingJobName=self._training_job_name)
315-
tuning_job_arn = training_description.get('TuningJobArn', None)
316-
if not tuning_job_arn:
317-
raise ValueError(
318-
"No metrics available. Training Job Analytics only available through Hyperparameter Tuning Jobs"
319-
)
320-
tuning_job_name = extract_name_from_job_arn(tuning_job_arn)
321-
tuning_job_description = self._sage_client.describe_hyper_parameter_tuning_job(
322-
HyperParameterTuningJobName=tuning_job_name
323-
)
324-
training_job_definition = tuning_job_description['TrainingJobDefinition']
325-
metric_definitions = training_job_definition['AlgorithmSpecification']['MetricDefinitions']
314+
315+
metric_definitions = training_description['AlgorithmSpecification']['MetricDefinitions']
326316
metric_names = [md['Name'] for md in metric_definitions]
317+
327318
return metric_names

src/sagemaker/tensorflow/deploying_tensorflow_serving.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ First, download the models and extract them:
289289

290290
.. code:: bash
291291
292-
aws c3 cp s3://mybucket/models/model1/model.tar.gz model1.tar.gz
293-
aws c3 cp s3://mybucket/models/model2/model.tar.gz model2.tar.gz
292+
aws s3 cp s3://mybucket/models/model1/model.tar.gz model1.tar.gz
293+
aws s3 cp s3://mybucket/models/model2/model.tar.gz model2.tar.gz
294294
mkdir -p multi/model1
295295
mkdir -p multi/model2
296296

tests/unit/test_estimator.py

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -824,28 +824,21 @@ def test_generic_training_job_analytics(sagemaker_session):
824824
sagemaker_session.sagemaker_client.describe_training_job = Mock(name='describe_training_job', return_value={
825825
'TuningJobArn': 'arn:aws:sagemaker:us-west-2:968277160000:hyper-parameter-tuning-job/mock-tuner',
826826
'TrainingStartTime': 1530562991.299,
827-
})
828-
sagemaker_session.sagemaker_client.describe_hyper_parameter_tuning_job = Mock(
829-
name='describe_hyper_parameter_tuning_job',
830-
return_value={
831-
'TrainingJobDefinition': {
832-
"AlgorithmSpecification": {
833-
"TrainingImage": "some-image-url",
834-
"TrainingInputMode": "File",
835-
"MetricDefinitions": [
836-
{
837-
"Name": "train:loss",
838-
"Regex": "train_loss=([0-9]+\\.[0-9]+)"
839-
},
840-
{
841-
"Name": "validation:loss",
842-
"Regex": "valid_loss=([0-9]+\\.[0-9]+)"
843-
}
844-
]
827+
"AlgorithmSpecification": {
828+
"TrainingImage": "some-image-url",
829+
"TrainingInputMode": "File",
830+
"MetricDefinitions": [
831+
{
832+
"Name": "train:loss",
833+
"Regex": "train_loss=([0-9]+\\.[0-9]+)"
834+
},
835+
{
836+
"Name": "validation:loss",
837+
"Regex": "valid_loss=([0-9]+\\.[0-9]+)"
845838
}
846-
}
847-
}
848-
)
839+
]
840+
},
841+
})
849842

850843
e = Estimator(IMAGE_NAME, ROLE, INSTANCE_COUNT, INSTANCE_TYPE, output_path=OUTPUT_PATH,
851844
sagemaker_session=sagemaker_session)

0 commit comments

Comments
 (0)