How Should I Treat Joblib Multiprocessing In An AWS Lambda Implementation?
I have a relatively simple linear regression lambda in AWS. Each instance the function is called the logs display the following: /opt/python/sklearn/externals/joblib/_multiprocessi
Solution 1:
To capture the warning and prevent it from being passed into the cloudwatch logs, you can filter the warning as follows.
import json
import warnings
warnings.filterwarnings('error')
try:
import sklearn
except Warning:
pass
def lambda_handler(event, context):
# TODO implement
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}
The article here, particularly towards the end, recreates and filters the warning.
Post a Comment for "How Should I Treat Joblib Multiprocessing In An AWS Lambda Implementation?"