When running the following command, the notebook gets stuck:
!gcloud ai-platform models create $MODEL_NAME
I’ve been also requested to enter a numerical choice for the region. I entered: 11 (us_central1)
The instructions are also asking - We’ll call this one xgb_mortgage
- I’m not sure what that means as the MODEL_NAME has been already defined (and we are not dealing with mortgages).
Any help will be most appreciated!
F.F.
Hi Fernando! Were you trying the instructions in the CodeLabs website? We updated the instructions there and pointed the reading item in the classroom to here . That has an additional flag in the gcloud
command you posted and also has a different MODEL_NAME
. Hope you get to try it and complete the lab. Thank you!
Hi Chris, thank you for your reply. It seems to be working, but now I get another error. Whilst executing
!gcloud ai-platform models create $MODEL_NAME --region=europe-west4
the error is
Using endpoint [https://europe-west4-ml.googleapis.com/]
API [ml.googleapis.com] not enabled on project [845662612597]. Would you like to
enable and retry (this will take a few minutes)? (y/N)?
Hi again! Perhaps this will help someone! So I have been able to resolve the problem by enabling AI Platform Training & Prediction API . Then what I also noticed is that the model and the compute instance must reside in the same region.
Set the end point name variable to the name of the region where your compute instance (virtual machine) resides. Then create a new model in that particular region (by default it is in the US and this will create an error if your compute instance is not in the same region)
So set the end_point_name variable and update the region variable in all other places where it occurs accordingly :
END_POINT_NAME = ‘europe-west4’
!gcloud ai-platform models create $MODEL_NAME –region=$END_POINT_NAME
!gcloud ai-platform versions create $VERSION_NAME
–model=$MODEL_NAME
–framework=‘XGBOOST’
–runtime-version=2.5
–origin=$MODEL_BUCKET
–python-version=3.7
–project=$GCP_PROJECT
–region=$END_POINT_NAME
prediction = !gcloud ai-platform predict --model=$MODEL_NAME --json-instances=predictions.json --version=$VERSION_NAME –region=$END_POINT_NAME
1 Like
Hi! Sorry I just saw this. Thank you for sharing the solution!