I'm trying to deploy a model to the cloud-ml engine by following the tutorial here (https://cloud.google.com/ml-engine/docs/scikit/quickstart), however when I reach the stage when I'm running the online prediction with this command:
gcloud ml-engine local predict --model-dir=$MODEL_DIR --json-instances
$INPUT_FILE --framework $FRAMEWORK
It results in this error:
ERROR: (gcloud.ml-engine.local.predict) RuntimeError: Bad magic number in .pyc file
Additionally, when trying to create a model version with this command:
gcloud ml-engine versions create $VERSION_NAME --model $MODEL_NAME --origin
$MODEL_DIR --runtime-version=1.12 --framework $FRAMEWORK --python-version=3.5
It results in this error:
ERROR: (gcloud.ml-engine.versions.create) Bad model detected with error: "Failed to load model: Could not load the model: /tmp/model/0001/model.joblib. 162. (Error code: 0)"
What's going on here? I'm running Python 3.5.2.