From c5182a31f75fe157d8efa174310f44fe76a07c76 Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Thu, 18 Apr 2019 08:58:24 -0700 Subject: [PATCH 1/2] fix: remove logging level overrides --- src/sagemaker/chainer/estimator.py | 1 - src/sagemaker/local/entities.py | 1 - src/sagemaker/local/image.py | 1 - src/sagemaker/local/local_session.py | 1 - src/sagemaker/model.py | 2 -- src/sagemaker/mxnet/estimator.py | 1 - src/sagemaker/pytorch/estimator.py | 1 - src/sagemaker/rl/estimator.py | 1 - src/sagemaker/session.py | 3 --- src/sagemaker/sklearn/estimator.py | 1 - src/sagemaker/tensorflow/estimator.py | 1 - 11 files changed, 14 deletions(-) diff --git a/src/sagemaker/chainer/estimator.py b/src/sagemaker/chainer/estimator.py index 63728a36fd..a7f3c784c1 100644 --- a/src/sagemaker/chainer/estimator.py +++ b/src/sagemaker/chainer/estimator.py @@ -20,7 +20,6 @@ from sagemaker.chainer.model import ChainerModel from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT -logging.basicConfig() logger = logging.getLogger('sagemaker') diff --git a/src/sagemaker/local/entities.py b/src/sagemaker/local/entities.py index 596e4fba5d..04148ff3ea 100644 --- a/src/sagemaker/local/entities.py +++ b/src/sagemaker/local/entities.py @@ -26,7 +26,6 @@ from sagemaker.utils import get_config_value logger = logging.getLogger(__name__) -logger.setLevel(logging.WARNING) _UNUSED_ARN = 'local:arn-does-not-matter' HEALTH_CHECK_TIMEOUT_LIMIT = 120 diff --git a/src/sagemaker/local/image.py b/src/sagemaker/local/image.py index c305b6dee0..e9cbb1bb26 100644 --- a/src/sagemaker/local/image.py +++ b/src/sagemaker/local/image.py @@ -49,7 +49,6 @@ TRAINING_JOB_NAME_ENV_NAME = 'TRAINING_JOB_NAME' logger = logging.getLogger(__name__) -logger.setLevel(logging.WARNING) class _SageMakerContainer(object): diff --git a/src/sagemaker/local/local_session.py b/src/sagemaker/local/local_session.py index 22da783c72..9bb46bd4c6 100644 --- a/src/sagemaker/local/local_session.py +++ b/src/sagemaker/local/local_session.py @@ -26,7 +26,6 @@ from sagemaker.utils import get_config_value logger = logging.getLogger(__name__) -logger.setLevel(logging.WARNING) class LocalSagemakerClient(object): diff --git a/src/sagemaker/model.py b/src/sagemaker/model.py index 3896145375..c9e2a7a36a 100644 --- a/src/sagemaker/model.py +++ b/src/sagemaker/model.py @@ -19,9 +19,7 @@ from sagemaker import fw_utils, local, session, utils from sagemaker.transformer import Transformer -logging.basicConfig() LOGGER = logging.getLogger('sagemaker') -LOGGER.setLevel(logging.INFO) NEO_ALLOWED_TARGET_INSTANCE_FAMILY = set(['ml_c5', 'ml_m5', 'ml_c4', 'ml_m4', 'jetson_tx1', 'jetson_tx2', 'ml_p2', 'ml_p3', 'deeplens', 'rasp3b']) diff --git a/src/sagemaker/mxnet/estimator.py b/src/sagemaker/mxnet/estimator.py index 3042b6a29c..4363e4fe93 100644 --- a/src/sagemaker/mxnet/estimator.py +++ b/src/sagemaker/mxnet/estimator.py @@ -20,7 +20,6 @@ from sagemaker.mxnet.model import MXNetModel from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT -logging.basicConfig() logger = logging.getLogger('sagemaker') diff --git a/src/sagemaker/pytorch/estimator.py b/src/sagemaker/pytorch/estimator.py index 44e84c6dcd..3980c7562f 100644 --- a/src/sagemaker/pytorch/estimator.py +++ b/src/sagemaker/pytorch/estimator.py @@ -20,7 +20,6 @@ from sagemaker.pytorch.model import PyTorchModel from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT -logging.basicConfig() logger = logging.getLogger('sagemaker') diff --git a/src/sagemaker/rl/estimator.py b/src/sagemaker/rl/estimator.py index 75c3587aeb..8449400879 100644 --- a/src/sagemaker/rl/estimator.py +++ b/src/sagemaker/rl/estimator.py @@ -22,7 +22,6 @@ from sagemaker.mxnet.model import MXNetModel from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT -logging.basicConfig() logger = logging.getLogger('sagemaker') SAGEMAKER_ESTIMATOR = 'sagemaker_estimator' diff --git a/src/sagemaker/session.py b/src/sagemaker/session.py index d98d93a5aa..1241fe2213 100644 --- a/src/sagemaker/session.py +++ b/src/sagemaker/session.py @@ -31,10 +31,7 @@ from sagemaker.user_agent import prepend_user_agent from sagemaker.utils import name_from_image, secondary_training_status_changed, secondary_training_status_message -logging.basicConfig() LOGGER = logging.getLogger('sagemaker') -LOGGER.setLevel(logging.INFO) - _STATUS_CODE_TABLE = { 'COMPLETED': 'Completed', diff --git a/src/sagemaker/sklearn/estimator.py b/src/sagemaker/sklearn/estimator.py index 4295a207a7..6644a2c337 100644 --- a/src/sagemaker/sklearn/estimator.py +++ b/src/sagemaker/sklearn/estimator.py @@ -21,7 +21,6 @@ from sagemaker.sklearn.model import SKLearnModel from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT -logging.basicConfig() logger = logging.getLogger('sagemaker') diff --git a/src/sagemaker/tensorflow/estimator.py b/src/sagemaker/tensorflow/estimator.py index 9fab748781..ed3da3677b 100644 --- a/src/sagemaker/tensorflow/estimator.py +++ b/src/sagemaker/tensorflow/estimator.py @@ -29,7 +29,6 @@ from sagemaker.utils import get_config_value from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT -logging.basicConfig() LOGGER = logging.getLogger('sagemaker') From 44a97a86dd0de5c1a16111d2a77381d481a47b8f Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Thu, 18 Apr 2019 09:24:13 -0700 Subject: [PATCH 2/2] fix copyright year --- src/sagemaker/chainer/estimator.py | 2 +- src/sagemaker/local/entities.py | 2 +- src/sagemaker/local/image.py | 2 +- src/sagemaker/local/local_session.py | 2 +- src/sagemaker/model.py | 2 +- src/sagemaker/mxnet/estimator.py | 2 +- src/sagemaker/pytorch/estimator.py | 2 +- src/sagemaker/rl/estimator.py | 2 +- src/sagemaker/session.py | 2 +- src/sagemaker/sklearn/estimator.py | 2 +- src/sagemaker/tensorflow/estimator.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sagemaker/chainer/estimator.py b/src/sagemaker/chainer/estimator.py index a7f3c784c1..57455107d9 100644 --- a/src/sagemaker/chainer/estimator.py +++ b/src/sagemaker/chainer/estimator.py @@ -1,4 +1,4 @@ -# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/local/entities.py b/src/sagemaker/local/entities.py index 04148ff3ea..7ac8a2383c 100644 --- a/src/sagemaker/local/entities.py +++ b/src/sagemaker/local/entities.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/local/image.py b/src/sagemaker/local/image.py index e9cbb1bb26..882d71d45d 100644 --- a/src/sagemaker/local/image.py +++ b/src/sagemaker/local/image.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/local/local_session.py b/src/sagemaker/local/local_session.py index 9bb46bd4c6..75595fada5 100644 --- a/src/sagemaker/local/local_session.py +++ b/src/sagemaker/local/local_session.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/model.py b/src/sagemaker/model.py index c9e2a7a36a..a9b4237622 100644 --- a/src/sagemaker/model.py +++ b/src/sagemaker/model.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/mxnet/estimator.py b/src/sagemaker/mxnet/estimator.py index 4363e4fe93..ca29ce6639 100644 --- a/src/sagemaker/mxnet/estimator.py +++ b/src/sagemaker/mxnet/estimator.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/pytorch/estimator.py b/src/sagemaker/pytorch/estimator.py index 3980c7562f..ce36eea6f0 100644 --- a/src/sagemaker/pytorch/estimator.py +++ b/src/sagemaker/pytorch/estimator.py @@ -1,4 +1,4 @@ -# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/rl/estimator.py b/src/sagemaker/rl/estimator.py index 8449400879..98a6be6cc0 100644 --- a/src/sagemaker/rl/estimator.py +++ b/src/sagemaker/rl/estimator.py @@ -1,4 +1,4 @@ -# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/session.py b/src/sagemaker/session.py index 1241fe2213..8fe7790ff5 100644 --- a/src/sagemaker/session.py +++ b/src/sagemaker/session.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/sklearn/estimator.py b/src/sagemaker/sklearn/estimator.py index 6644a2c337..a0c55d240d 100644 --- a/src/sagemaker/sklearn/estimator.py +++ b/src/sagemaker/sklearn/estimator.py @@ -1,4 +1,4 @@ -# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of diff --git a/src/sagemaker/tensorflow/estimator.py b/src/sagemaker/tensorflow/estimator.py index ed3da3677b..025a1d9113 100644 --- a/src/sagemaker/tensorflow/estimator.py +++ b/src/sagemaker/tensorflow/estimator.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of