ml-engine: package-uris 无法安装包

ml-engine: package-uris cannot install package

在文件结构为 ml-engine 的模型上训练时,我正在尝试安装一个包:

/ml_engine
  setup.py
  /trainer
    __init__.py
    task.py
    model.py

我已经 运行: python setup.py sdist 创建了一个包,并将包上传到存储桶。

最后,

gcloud alpha ml-engine versions create m_0_03 \
--model {model_name} \
--origin gs://{model_location} \
--runtime-version 1.10 \
--framework SCIKIT_LEARN \
--python-version 3.5 \
--package-uris gs://{package_location} \
--model-class trainer.model \

但是报错:

Creating version (this might take a few minutes)......
.......................................................................................................................................................................................................................................................failed.
ERROR: (gcloud.alpha.ml-engine.versions.create) Bad model detected with error:  
"Failed to load model: User-provided package dist.tar.gz failed to install: Command '['python-default', '-m', 'pip', 'install', '--target=/tmp/custom_lib', '--no-cache-dir', '/tmp/custom_code/dist.tar.gz']' returned non-zero exit status 1 (Error code: 0)"

我尝试下载相同的包,并在本地成功安装。

Google 目前在创建自定义 ML 模型版本时遇到问题。