aws / sagemaker-pytorch-inference-toolkit

Toolkit for allowing inference and serving with PyTorch on SageMaker. Dockerfiles used for building SageMaker Pytorch Containers are at https://github.com/aws/deep-learning-containers.
Apache License 2.0
134 stars 72 forks source link

Support custom log4j.properties for torchserve #103

Open stevenmanton opened 3 years ago

stevenmanton commented 3 years ago

Issue #, if available:

By default, the logging level for torchserve is INFO, which can create a ton of logs.

83

Description of changes:

There is a hacky workaround where you can fork this repo, change the log4j.properties, and install that fork in requirements.txt, but the changes in this PR support a more elegant solution.

The code simply checks the code directory for log4j.properties (in exactly the same way it looks for requirements.txt). If it finds that file, it uses it for the logging configuration passed to torchserve. If it doesn't, it uses the default.

sagemaker-bot commented 3 years ago

AWS CodeBuild CI Report

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

sagemaker-bot commented 3 years ago

AWS CodeBuild CI Report

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

sagemaker-bot commented 3 years ago

AWS CodeBuild CI Report

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

stevenmanton commented 3 years ago

@icywang86rui Here's another PR for you to take a look at. Thank you!

stevenmanton commented 3 years ago

@schenqian would you mind taking a look at this PR? Thanks!

j-adamczyk commented 2 years ago

+1, this would be very useful

beatrizdemiguelperez commented 1 year ago

This looks very useful!