[在AWS Lambda上使用numba运行脚本时,我总是收到此警告:
/var/task/numba/npyufunc/parallel.py:300: UserWarning: Could not obtain multiprocessing lock due to OS level error: Errno 38] Function not implemented
由于AWS Lambda不支持多重处理,有什么办法可以忽略此错误?
将此代码添加到导入了lambda句柄的python文件中:
import warnings
warnings.filterwarnings(action='ignore', message='Could not obtain multiprocessing lock')
这将忽略该特定警告,同时仍打印脚本可能产生的任何其他警告。