Open oonisim opened 4 years ago
I think the easiest way of implementing this would be allowing the customer to provide their own log4j config file through the dependencies arg here. The file should follow a naming convention, something like ./override/etc/log4j.properties
. And in the container side we just us the custom override config file if it exists here
+1, this would be very useful
Any news on this? This is very problematic for anything using PySpark (both training and inference), which outputs a lot of logs, and 99% are totally useless
+1, any update?
Seems, I'm experiencing the same issue: SAGEMAKER_CONTAINER_LOG_LEVEL
doesn't impact on a log level in a container - always shows all logs.
Describe the bug The PyTorch SageMaker endpoint cloudwatch log level is INFO only which cannot be changed without creating a BYO container.
Hence all the access including /ping besides the /invocations are generating logs that clutters the cloudwarch log stream making it difficult to go directly to the errors for troubleshooting. In my understanding, this will incur the cloudwatch cost as well.
The AWS support case 7309023801 was opened and it was indicated the log level cannot be changed, or need to build our own container to control the log level.
To reproduce Deploy a PyTorch Model where Python log level is set to logging.ERROR via SageMaker SDK and refer to the cloudwach log for /aws/sagemaker/Endpoints/.
Expected behavior The log level configuration is reflected and only ERROR will be logged in the cloudwatch.
System information SageMaker endpoint in us-east-1.
Toolkit version: Not sure
Framework version: PyTorch 1.4.0, 1.5.1
Python version: Python 3.6
CPU or GPU: GPU
Custom Docker image (Y/N): N
Additional context
Endpoint startup message in the cloudwatch.