|
17 | 17 | import logging
|
18 | 18 | import os
|
19 | 19 | import uuid
|
20 |
| -import warnings |
21 | 20 | from abc import ABCMeta
|
22 | 21 | from abc import abstractmethod
|
23 | 22 |
|
|
46 | 45 | from sagemaker.model import (
|
47 | 46 | SCRIPT_PARAM_NAME,
|
48 | 47 | DIR_PARAM_NAME,
|
49 |
| - CLOUDWATCH_METRICS_PARAM_NAME, |
50 | 48 | CONTAINER_LOG_LEVEL_PARAM_NAME,
|
51 | 49 | JOB_NAME_PARAM_NAME,
|
52 | 50 | SAGEMAKER_REGION_PARAM_NAME,
|
@@ -1433,7 +1431,6 @@ def __init__(
|
1433 | 1431 | entry_point,
|
1434 | 1432 | source_dir=None,
|
1435 | 1433 | hyperparameters=None,
|
1436 |
| - enable_cloudwatch_metrics=False, |
1437 | 1434 | container_log_level=logging.INFO,
|
1438 | 1435 | code_location=None,
|
1439 | 1436 | image_uri=None,
|
@@ -1491,9 +1488,6 @@ def __init__(
|
1491 | 1488 | SageMaker. For convenience, this accepts other types for keys
|
1492 | 1489 | and values, but ``str()`` will be called to convert them before
|
1493 | 1490 | training.
|
1494 |
| - enable_cloudwatch_metrics (bool): [DEPRECATED] Now there are |
1495 |
| - cloudwatch metrics emitted by all SageMaker training jobs. This |
1496 |
| - will be ignored for now and removed in a further release. |
1497 | 1491 | container_log_level (int): Log level to use within the container
|
1498 | 1492 | (default: logging.INFO). Valid values are defined in the Python
|
1499 | 1493 | logging module.
|
@@ -1624,12 +1618,6 @@ def __init__(
|
1624 | 1618 | self.dependencies = dependencies or []
|
1625 | 1619 | self.uploaded_code = None
|
1626 | 1620 |
|
1627 |
| - if enable_cloudwatch_metrics: |
1628 |
| - warnings.warn( |
1629 |
| - "enable_cloudwatch_metrics is now deprecated and will be removed in the future.", |
1630 |
| - DeprecationWarning, |
1631 |
| - ) |
1632 |
| - self.enable_cloudwatch_metrics = False |
1633 | 1621 | self.container_log_level = container_log_level
|
1634 | 1622 | self.code_location = code_location
|
1635 | 1623 | self.image_uri = image_uri
|
@@ -1687,7 +1675,6 @@ def _prepare_for_training(self, job_name=None):
|
1687 | 1675 | # Modify hyperparameters in-place to point to the right code directory and script URIs
|
1688 | 1676 | self._hyperparameters[DIR_PARAM_NAME] = code_dir
|
1689 | 1677 | self._hyperparameters[SCRIPT_PARAM_NAME] = script
|
1690 |
| - self._hyperparameters[CLOUDWATCH_METRICS_PARAM_NAME] = self.enable_cloudwatch_metrics |
1691 | 1678 | self._hyperparameters[CONTAINER_LOG_LEVEL_PARAM_NAME] = self.container_log_level
|
1692 | 1679 | self._hyperparameters[JOB_NAME_PARAM_NAME] = self._current_job_name
|
1693 | 1680 | self._hyperparameters[SAGEMAKER_REGION_PARAM_NAME] = self.sagemaker_session.boto_region_name
|
@@ -1798,9 +1785,6 @@ class constructor
|
1798 | 1785 | init_params["hyperparameters"].get(SCRIPT_PARAM_NAME)
|
1799 | 1786 | )
|
1800 | 1787 | init_params["source_dir"] = json.loads(init_params["hyperparameters"].get(DIR_PARAM_NAME))
|
1801 |
| - init_params["enable_cloudwatch_metrics"] = json.loads( |
1802 |
| - init_params["hyperparameters"].get(CLOUDWATCH_METRICS_PARAM_NAME) |
1803 |
| - ) |
1804 | 1788 | init_params["container_log_level"] = json.loads(
|
1805 | 1789 | init_params["hyperparameters"].get(CONTAINER_LOG_LEVEL_PARAM_NAME)
|
1806 | 1790 | )
|
|
0 commit comments