Skip to content

Commit 5edbbcb

Browse files
author
Ignacio Quintero
committed
Deprecate enable_cloudwatch_metrics from Frameworks
There is a warning message for now, but it will be removed later.
1 parent 1ec470f commit 5edbbcb

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
CHANGELOG
33
=========
44

5+
1.6.2dev
6+
========
7+
* deprecate enable_cloudwatch_metrics from Framework Estimators.
8+
59
1.6.1
610
=====
711

src/sagemaker/estimator.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ def __init__(self, entry_point, source_dir=None, hyperparameters=None, enable_cl
507507
The hyperparameters are made accessible as a dict[str, str] to the training code on SageMaker.
508508
For convenience, this accepts other types for keys and values, but ``str()`` will be called
509509
to convert them before training.
510-
enable_cloudwatch_metrics (bool): Whether training and hosting containers will
511-
generate CloudWatch metrics under the AWS/SageMakerContainer namespace (default: False).
510+
enable_cloudwatch_metrics (bool): [DEPRECATED] Now there are cloudwatch metrics emitted by all SageMaker
511+
training jobs. This will be ignored for now and removed in a further release.
512512
container_log_level (int): Log level to use within the container (default: logging.INFO).
513513
Valid values are defined in the Python logging module.
514514
code_location (str): Name of the S3 bucket where custom code is uploaded (default: None).
@@ -521,7 +521,9 @@ def __init__(self, entry_point, source_dir=None, hyperparameters=None, enable_cl
521521
super(Framework, self).__init__(**kwargs)
522522
self.source_dir = source_dir
523523
self.entry_point = entry_point
524-
self.enable_cloudwatch_metrics = enable_cloudwatch_metrics
524+
if enable_cloudwatch_metrics:
525+
logging.warn('enable_cloudwatch_metrics is now deprecated and will be removed in the future.')
526+
self.enable_cloudwatch_metrics = False
525527
self.container_log_level = container_log_level
526528
self._hyperparameters = hyperparameters or {}
527529
self.code_location = code_location

src/sagemaker/mxnet/README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,6 @@ The MXNetModel constructor takes the following arguments:
543543
directory with any other training source code dependencies aside from
544544
tne entry point file. Structure within this directory will be
545545
preserved when training on SageMaker.
546-
- ``enable_cloudwatch_metrics (boolean):`` Optional. If true, training
547-
and hosting containers will generate Cloudwatch metrics under the
548-
AWS/SageMakerContainer namespace.
549546
- ``container_log_level (int):`` Log level to use within the container.
550547
Valid values are defined in the Python logging module.
551548
- ``code_location (str):`` Optional. Name of the S3 bucket where your

0 commit comments

Comments
 (0)