Skip to content

Commit 397fb90

Browse files
authored
fix: remove logging level overrides (#757)
1 parent 2267fc7 commit 397fb90

File tree

11 files changed

+11
-25
lines changed

11 files changed

+11
-25
lines changed

src/sagemaker/chainer/estimator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -20,7 +20,6 @@
2020
from sagemaker.chainer.model import ChainerModel
2121
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
2222

23-
logging.basicConfig()
2423
logger = logging.getLogger('sagemaker')
2524

2625

src/sagemaker/local/entities.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -26,7 +26,6 @@
2626
from sagemaker.utils import get_config_value
2727

2828
logger = logging.getLogger(__name__)
29-
logger.setLevel(logging.WARNING)
3029

3130
_UNUSED_ARN = 'local:arn-does-not-matter'
3231
HEALTH_CHECK_TIMEOUT_LIMIT = 120

src/sagemaker/local/image.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -49,7 +49,6 @@
4949
TRAINING_JOB_NAME_ENV_NAME = 'TRAINING_JOB_NAME'
5050

5151
logger = logging.getLogger(__name__)
52-
logger.setLevel(logging.WARNING)
5352

5453

5554
class _SageMakerContainer(object):

src/sagemaker/local/local_session.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -26,7 +26,6 @@
2626
from sagemaker.utils import get_config_value
2727

2828
logger = logging.getLogger(__name__)
29-
logger.setLevel(logging.WARNING)
3029

3130

3231
class LocalSagemakerClient(object):

src/sagemaker/model.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -19,9 +19,7 @@
1919
from sagemaker import fw_utils, local, session, utils
2020
from sagemaker.transformer import Transformer
2121

22-
logging.basicConfig()
2322
LOGGER = logging.getLogger('sagemaker')
24-
LOGGER.setLevel(logging.INFO)
2523

2624
NEO_ALLOWED_TARGET_INSTANCE_FAMILY = set(['ml_c5', 'ml_m5', 'ml_c4', 'ml_m4', 'jetson_tx1', 'jetson_tx2', 'ml_p2',
2725
'ml_p3', 'deeplens', 'rasp3b'])

src/sagemaker/mxnet/estimator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -20,7 +20,6 @@
2020
from sagemaker.mxnet.model import MXNetModel
2121
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
2222

23-
logging.basicConfig()
2423
logger = logging.getLogger('sagemaker')
2524

2625

src/sagemaker/pytorch/estimator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -20,7 +20,6 @@
2020
from sagemaker.pytorch.model import PyTorchModel
2121
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
2222

23-
logging.basicConfig()
2423
logger = logging.getLogger('sagemaker')
2524

2625

src/sagemaker/rl/estimator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -22,7 +22,6 @@
2222
from sagemaker.mxnet.model import MXNetModel
2323
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
2424

25-
logging.basicConfig()
2625
logger = logging.getLogger('sagemaker')
2726

2827
SAGEMAKER_ESTIMATOR = 'sagemaker_estimator'

src/sagemaker/session.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -31,10 +31,7 @@
3131
from sagemaker.user_agent import prepend_user_agent
3232
from sagemaker.utils import name_from_image, secondary_training_status_changed, secondary_training_status_message
3333

34-
logging.basicConfig()
3534
LOGGER = logging.getLogger('sagemaker')
36-
LOGGER.setLevel(logging.INFO)
37-
3835

3936
_STATUS_CODE_TABLE = {
4037
'COMPLETED': 'Completed',

src/sagemaker/sklearn/estimator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -21,7 +21,6 @@
2121
from sagemaker.sklearn.model import SKLearnModel
2222
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
2323

24-
logging.basicConfig()
2524
logger = logging.getLogger('sagemaker')
2625

2726

src/sagemaker/tensorflow/estimator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -29,7 +29,6 @@
2929
from sagemaker.utils import get_config_value
3030
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
3131

32-
logging.basicConfig()
3332
LOGGER = logging.getLogger('sagemaker')
3433

3534

0 commit comments

Comments
 (0)