|
59 | 59 | from sagemaker.utils import base_name_from_image, name_from_base, get_config_value |
60 | 60 | from sagemaker import vpc_utils |
61 | 61 |
|
| 62 | +logger = logging.getLogger(__name__) |
| 63 | + |
62 | 64 |
|
63 | 65 | class EstimatorBase(with_metaclass(ABCMeta, object)): |
64 | 66 | """Handle end-to-end Amazon SageMaker training and deployment tasks. |
@@ -730,7 +732,7 @@ def model_data(self): |
730 | 732 | TrainingJobName=self.latest_training_job.name |
731 | 733 | )["ModelArtifacts"]["S3ModelArtifacts"] |
732 | 734 | else: |
733 | | - logging.warning( |
| 735 | + logger.warning( |
734 | 736 | "No finished training job found associated with this estimator. Please make sure " |
735 | 737 | "this estimator is only used for building workflow config" |
736 | 738 | ) |
@@ -826,7 +828,7 @@ def delete_endpoint(self): |
826 | 828 | Raises: |
827 | 829 | botocore.exceptions.ClientError: If the endpoint does not exist. |
828 | 830 | """ |
829 | | - logging.warning( |
| 831 | + logger.warning( |
830 | 832 | "estimator.delete_endpoint() will be deprecated in SageMaker Python SDK v2. " |
831 | 833 | "Please use the delete_endpoint() function on your predictor instead." |
832 | 834 | ) |
@@ -908,7 +910,7 @@ def transformer( |
908 | 910 | tags = tags or self.tags |
909 | 911 |
|
910 | 912 | if self.latest_training_job is None: |
911 | | - logging.warning( |
| 913 | + logger.warning( |
912 | 914 | "No finished training job found associated with this estimator. Please make sure " |
913 | 915 | "this estimator is only used for building workflow config" |
914 | 916 | ) |
@@ -1029,7 +1031,7 @@ def start_new(cls, estimator, inputs, experiment_config): |
1029 | 1031 |
|
1030 | 1032 | if isinstance(inputs, s3_input): |
1031 | 1033 | if "InputMode" in inputs.config: |
1032 | | - logging.debug( |
| 1034 | + logger.debug( |
1033 | 1035 | "Selecting s3_input's input_mode (%s) for TrainingInputMode.", |
1034 | 1036 | inputs.config["InputMode"], |
1035 | 1037 | ) |
@@ -1279,7 +1281,7 @@ def __init__( |
1279 | 1281 | https://docs.aws.amazon.com/sagemaker/latest/dg/API_AlgorithmSpecification.html#SageMaker-Type-AlgorithmSpecification-EnableSageMakerMetricsTimeSeries |
1280 | 1282 | (default: ``None``). |
1281 | 1283 | """ |
1282 | | - logging.warning(parameter_v2_rename_warning("image_name", "image_uri")) |
| 1284 | + logger.warning(parameter_v2_rename_warning("image_name", "image_uri")) |
1283 | 1285 | self.image_name = image_name |
1284 | 1286 | self.hyperparam_dict = hyperparameters.copy() if hyperparameters else {} |
1285 | 1287 | super(Estimator, self).__init__( |
@@ -1653,7 +1655,7 @@ def __init__( |
1653 | 1655 | self.code_location = code_location |
1654 | 1656 | self.image_name = image_name |
1655 | 1657 | if image_name is not None: |
1656 | | - logging.warning(parameter_v2_rename_warning("image_name", "image_uri")) |
| 1658 | + logger.warning(parameter_v2_rename_warning("image_name", "image_uri")) |
1657 | 1659 |
|
1658 | 1660 | self.uploaded_code = None |
1659 | 1661 |
|
@@ -2029,7 +2031,7 @@ def transformer( |
2029 | 2031 | if env is not None: |
2030 | 2032 | transform_env.update(env) |
2031 | 2033 | else: |
2032 | | - logging.warning( |
| 2034 | + logger.warning( |
2033 | 2035 | "No finished training job found associated with this estimator. Please make sure " |
2034 | 2036 | "this estimator is only used for building workflow config" |
2035 | 2037 | ) |
|
0 commit comments