Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container_log_level does not work in TensorFlow estimator #1875

Closed
tailaiw opened this issue Sep 8, 2020 · 2 comments
Closed

container_log_level does not work in TensorFlow estimator #1875

tailaiw opened this issue Sep 8, 2020 · 2 comments
Labels

Comments

@tailaiw
Copy link

tailaiw commented Sep 8, 2020

Describe the bug
Parameter container_log_level does not work in TensorFlow estimator

To reproduce
I have a TensorFlow estimator built roughly as follows

import logging
from sagemaker.tensorflow import TensorFlow
estimator = TensorFlow(
        sagemaker_session=sagemaker_session,
        entry_point="my_entry_point.py",
        source_dir=my_source_dir,
        role=my_role,
        instance_count=1,
        instance_type="ml.p3.2xlarge",    
        framework_version="2.1",
        py_version="py3",
        checkpoint_s3_uri=my_checkpoint_s3_uri,
        container_log_level=logging.WARNING)

I expect now logs lower than WARNING will be included in the training job logs. However, a lot of INFO level logs are observed. Particularly, a lot of INFO logs related to frequent checkpoint uploading (from instance to S3) are observed, which makes the entire log super long. I tried logging.ERROR and no luck either.

Expected behavior
No log except WARNING and ERROR level ones should be observed.

Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.
image

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.5.1
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): TensorFlow
  • Framework version: 2.1
  • Python version: 3.7
  • CPU or GPU: GPU
  • Custom Docker image (Y/N): N
@ajaykarpur ajaykarpur added the bug label Sep 15, 2020
@chuyang-deng
Copy link
Contributor

chuyang-deng commented Sep 20, 2020

logger config in sagemaker-training-toolkit does not seem to be configured correctly with log levels: https://github.com/aws/sagemaker-training-toolkit/blob/master/src/sagemaker_training/logging_config.py#L39

With the above logic, as long as logging level >= logging.INFO, boto3 and s3transfer will ALWAYS have logging.INFO and botocore will always have logging.WARN.

We should pass the log_level as it is to training-toolkit's logger configure

@icywang86rui
Copy link
Contributor

Fix is merged. Closing the issue. Feel free to reopen if the problem still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants