google-cloud-platformgcp-ai-platform-training

How to start AI-Platform jobs automatically?


I created a training job where I fetch my data from big query, perform training and deploy model. I would like to start training automatically in this two cases:

  1. More than 1000 new rows added to the dataset
  2. With a schedule (Ex, once a week)

I checked GCP Cloud Scheduler, but it seems its not suitable for my case.


Solution

  • Cloud Scheduler is the right tool to trigger your training on a schedule. I don't know what your blocker is!!

    For your first point, you can't. You can't put a trigger (on BigQuery or on other database) to send an event after X new rows. For this, I recommend you to do this:

    As you see, it's not so easy and there is several caveats:

    Does it make sense for you?

    EDIT

    gcloud command is a "simple" wrapper of API calls. Try to add the param --http-log to your gcloud command to see which API is called and with which params.

    Anyway, you can start a job by calling this API, and if you want and example, use the --http-log param of gcloud SDK!