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

时间:2018-09-06 16:35:38

标签: google-cloud-platform google-cloud-ml

在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)"

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

1 个答案:

答案 0 :(得分:0)

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