我正在尝试在mlflow
中使用aws lambda function
下载模型,如下所述:https://www.mlflow.org/docs/latest/tracking.html#referencing-artifacts
但是会引发以下错误:
File "/tmp/mlflow-api-server/mlflow/tracking/artifact_utils.py", line 66, in _download_artifact_from_uri
artifact_path=artifact_path, dst_path=output_path)
File "/tmp/mlflow-api-server/mlflow/store/artifact_repo.py", line 94, in download_artifacts
dst_path = tempfile.mkdtemp()
File "/var/lang/lib/python3.6/tempfile.py", line 360, in mkdtemp
prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
File "/var/lang/lib/python3.6/tempfile.py", line 130, in _sanitize_params
dir = gettempdir()
File "/var/lang/lib/python3.6/tempfile.py", line 298, in gettempdir
tempdir = _get_default_tempdir()
File "/var/lang/lib/python3.6/tempfile.py", line 233, in _get_default_tempdir
dirlist)
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp']
model.pkl
应该下载的sklearn mlflow
文件有627字节,而aws lambda
的限制应该是512 MB,应该有足够的空间。