google-cloud-platformgcp-ai-platform-traininggoogle-ai-platformgoogle-cloud-ai-platform-pipelines

After training in AI Platform, where can I find model.bst or other model file?


I trained a XGBoost model using AI Platform as here.

Now I have the choice in the Console to download the model, as follows (but not Deploy it, since "Only models trained with built-in algorithms can be deployed from this page"). So, I click to download.

enter image description here

However, in the bucket the only file I see is a tar, as follows.

enter image description here

That tar (directory tree follows) holds only some training code, and not a model.bst, model.pkl, or model.joblib, or other such model file.

enter image description here

Where do I find model.bst or the like, which I can deploy?


EDIT:

Following the answer, below, we see that the "Download model" button is misleading as it sends us to the job directory, not the output directory (which is set arbitrarily in the codel the model is at census_data_20210527_215945/model.bst )

bucket = storage.Client().bucket(BUCKET_ID)
blob = bucket.blob('{}/{}'.format(
    datetime.datetime.now().strftime('census_%Y%m%d_%H%M%S'),
    model))
blob.upload_from_filename(model)

Solution

  • Only in-build algorithms automatically store the model in Google Cloud storage.

    In your case, you have a custom training application. You have to take care of saving the model on your own.

    Referring to your example this is implemented as listed here.

    The model is uploaded to Google Cloud Storage using the cloud storage client.