执行:
gcloud beta ai-platform versions create $VERSION_NAME \
--model $MODEL_NAME \
--runtime-version 2.3 \
--python-version 3.7 \
--origin gs://$BUCKET_NAME/dummy/v1/model/ \
--package-uris gs://$BUCKET_NAME/dummy/v1/dummy_diagnostic_model-0.1.tar.gz \
--prediction-class predictor.MyPredictor
结果是:
ERROR: (gcloud.beta.ai-platform.versions.create) Create Version failed. Bad model detected with error: "Failed to load model: Unexpected error when loading the model: No module named 'k' (Error code: 0)"
在本地运行此成功:
pip install --upgrade --target=/tmp/custom_lib --no-cache-dir -b /tmp/pip_builds dist/dummy_diagnostic_model-0.1.tar.gz
我猜这个问题是关于未在 gcloud 机器上配置的 gitlab 访问令牌,我该如何解决这个问题?