<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jonny Browning on Medium]]></title>
        <description><![CDATA[Stories by Jonny Browning on Medium]]></description>
        <link>https://medium.com/@jonny.browning?source=rss-ff760d36db53------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*W7ipFeIdGoEp82TD.jpg</url>
            <title>Stories by Jonny Browning on Medium</title>
            <link>https://medium.com/@jonny.browning?source=rss-ff760d36db53------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 22:35:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jonny.browning/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Vertex AI Tips and Tricks: Scheduling Vertex Pipelines Easily with Terraform and Cloud Scheduler]]></title>
            <link>https://blog.montrealanalytics.com/vertex-ai-tips-and-tricks-scheduling-vertex-pipelines-easily-with-terraform-and-cloud-scheduler-d7fb9c235e45?source=rss-ff760d36db53------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7fb9c235e45</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[vertex-ai]]></category>
            <category><![CDATA[vertex-pipeline]]></category>
            <category><![CDATA[google-cloud]]></category>
            <dc:creator><![CDATA[Jonny Browning]]></dc:creator>
            <pubDate>Tue, 19 Jul 2022 09:23:21 GMT</pubDate>
            <atom:updated>2023-06-26T11:12:24.367Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biPcr7OUs5gHn4h7bnyHOQ.png" /></figure><p><a href="https://cloud.google.com/vertex-ai/docs/pipelines/introduction">Vertex Pipelines</a> provides a great way to orchestrate your Machine Learning workloads serverlessly on Google Cloud. It is based on <a href="https://www.kubeflow.org/docs/components/pipelines/">KubeFlow Pipelines</a>, an open-source platform for building Machine Learning (ML) pipelines using containers.</p><p>However, unlike KubeFlow Pipelines, Vertex Pipelines does not have a built-in mechanism for scheduling pipeline runs. For many use cases, the ability to schedule pipeline runs is a key element of ML automation (e.g., scheduled batch prediction pipelines, scheduled model retraining…).</p><p>In the <a href="https://cloud.google.com/vertex-ai/docs/pipelines/schedule-cloud-scheduler">Vertex Pipelines documentation</a>, Google provides an approach for scheduling Vertex Pipeline jobs using a few other GCP services:</p><ol><li>Cloud Scheduler for scheduling an HTTP request, that will trigger:</li><li>A Cloud Function, that will trigger the Vertex pipeline using the Vertex AI SDK</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mh8wq50RqkR27uH8KmA-OA.png" /><figcaption>Fig 1: Google’s proposed approach for scheduling Vertex Pipelines requires a Cloud Function to trigger pipeline runs using the Vertex AI SDK</figcaption></figure><p>However, did you know that you can eliminate the need for a Cloud Function and trigger Vertex Pipelines using <strong>only</strong> Cloud Scheduler?</p><p>One of the great features of the Vertex AI platform is that it is fully modular, and each component of the platform is exposed as an HTTP REST API. This includes a method to create PipelineJobs! (i.e. Vertex Pipeline runs). Since Cloud Scheduler can be used to schedule HTTP requests, we can use Cloud Scheduler to <strong>directly interact with the Vertex REST API</strong>, rather than using it to trigger a Cloud Function!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94n3AU_dpPQdb3TDWWceOQ.png" /><figcaption>Fig 2: Cloud Scheduler can be used to trigger pipeline runs using an HTTP request directly to the Vertex API</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WYb1f3gQw3Q7d_SI3I9veA.png" /><figcaption>Fig 3: The REST resource spec for a PipelineJob. This is the JSON message you would need to construct to trigger a pipeline run. See also the REST API documentation for creating Vertex Pipeline runs: <a href="https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.pipelineJobs/create">https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.pipelineJobs/create</a></figcaption></figure><p>So, we can schedule Vertex Pipeline runs by crafting the right HTTP request in our Cloud Scheduler job that will interact directly with the Vertex API. Great! But, creating this HTTP request is fiddly and not user-friendly; we need a way to automate this to make it easier to use.</p><p><strong>Introducing Datatonic’s Open-Source Terraform Module</strong></p><p>To address this issue, <a href="https://datatonic.com/">Datatonic</a> has just released an open-source Terraform module that makes it really simple to manage your scheduled Vertex Pipelines using Infrastructure-as-Code. Let’s take a look at what this looks like in practice. There are three main steps:</p><ol><li>Create a Terraform configuration in your git repository. You will need to install the <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs">Google Cloud Terraform provider</a>. You should also <a href="https://www.terraform.io/language/settings/backends/gcs">configure your Terraform state to use a remote backend</a>, such as Google Cloud Storage (GCS) .</li><li>In your main.tf file, include the module definition following the example below. Note that pipeline_spec_path can either be a local or a GCS path.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0be6c260742e3d3a05f1fc539870c8aa/href">https://medium.com/media/0be6c260742e3d3a05f1fc539870c8aa/href</a></iframe><p>3. Set up CI/CD to automatically deploy your Terraform configuration when you merge your code. There are different ways to do this — for example, check out <a href="https://cloud.google.com/architecture/managing-infrastructure-as-code">this guide</a> in the Google Cloud Architecture Center for setting up Terraform using Google Cloud Build.</p><p>Once that’s done, you can easily specify your pipeline schedules in your Terraform configuration, and merge your code. Your CI/CD pipeline will automatically deploy the Cloud Scheduler jobs to Google Cloud.</p><p>For more details, check out the Terraform module on the <a href="https://registry.terraform.io/modules/teamdatatonic/scheduled-vertex-pipelines/google/latest">Terraform registry</a> and on <a href="https://github.com/teamdatatonic/terraform-google-scheduled-vertex-pipelines">GitHub</a>. Don’t forget to <a href="https://medium.com/datatonic">follow us on Medium</a> for more Vertex AI Tips and Tricks and much more!</p><p><strong><em>Datatonic are </em></strong><a href="https://datatonic.com/insights/datatonic-google-cloud-specialization-partner-award-machine-learning/"><strong><em>Google Cloud’s Machine Learning Partner of the Year</em></strong></a><strong><em> with a wealth of experience developing and deploying impactful Machine Learning models and MLOps Platform builds. Need help with developing an ML model, or deploying your Machine Learning models fast? Have a look at our </em></strong><a href="https://datatonic.com/insights/vertex-ai-mlops-platform/"><strong><em>MLOps 101 webinar,</em></strong></a><strong><em> where our experts talk you through how to get started with Machine Learning at scale or </em></strong><a href="https://datatonic.com/contact"><strong><em>get in touch</em></strong></a><strong><em> to discuss your ML or MLOps requirements!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7fb9c235e45" width="1" height="1" alt=""><hr><p><a href="https://blog.montrealanalytics.com/vertex-ai-tips-and-tricks-scheduling-vertex-pipelines-easily-with-terraform-and-cloud-scheduler-d7fb9c235e45">Vertex AI Tips and Tricks: Scheduling Vertex Pipelines Easily with Terraform and Cloud Scheduler</a> was originally published in <a href="https://blog.montrealanalytics.com/">${around_the_block}</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vertex AI Tips and Tricks: Setting Up Alerts for Vertex Pipelines with Google Cloud Monitoring]]></title>
            <link>https://blog.montrealanalytics.com/vertex-ai-tips-and-tricks-setting-up-alerts-for-vertex-pipelines-with-google-cloud-monitoring-3e0a277795cf?source=rss-ff760d36db53------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e0a277795cf</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[vertex-pipeline]]></category>
            <category><![CDATA[vertex-ai]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[google-cloud]]></category>
            <dc:creator><![CDATA[Jonny Browning]]></dc:creator>
            <pubDate>Tue, 12 Jul 2022 14:01:50 GMT</pubDate>
            <atom:updated>2023-06-27T10:42:44.697Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HSdG88NfVOJQDyc6dzco5w.png" /></figure><p>Monitoring and alerting are essential parts of any production system. If your system isn’t working as expected, you want to be the first to know! Machine Learning (ML) systems are no different. Alerting can be particularly useful for ML systems; for long-running jobs, you don’t want to be sat watching the progress!</p><p>Vertex AI is integrated with Google Cloud Monitoring, so your Vertex Pipeline status is logged automatically for you, and you can easily create alerting on top of this.</p><p>In the example below, I will show how you can set up email alerts to let you know when a Vertex Pipeline has failed in your project. You can also set up alerts across different communication channels — <a href="https://cloud.google.com/monitoring/support/notification-options">SMS, Slack, PagerDuty, and more.</a></p><p>Let’s dive in!</p><p>First, we should create a notification channel to let Google Cloud know where to send our email alerts. In the Google Cloud console, go to the <a href="https://console.cloud.google.com/monitoring/alerting">alerting page</a>, and click <strong>EDIT NOTIFICATION CHANNELS</strong>.</p><p>Next to <strong>Email</strong>, click <strong>ADD NEW</strong>. Enter the email address to use for the alerts and the display name for the email channel. If you want to send alerts to multiple addresses, you can either set up a Google group with multiple users, or you can set up multiple notification channels (one for each address).</p><p><em>(Beware of the </em><strong><em>bystander effect</em></strong><em>! Alerting multiple people can lead to </em><strong><em>diffusion of responsibility</em></strong><em>, whereby nobody acts on an alert because they know that others have also been notified, and each assumes that somebody else will deal with the problem!)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*cxu4rUFIk0OtZgwThCEOBg.png" /><figcaption>Fig 1: Creating an Email Channel</figcaption></figure><p>Now that we have added a notification channel, let’s head to the <a href="https://console.cloud.google.com/logs/query">Logs Explorer</a> in the Google Cloud console.</p><p>On the right-hand side, toggle the switch labelled <strong>Show query</strong> to reveal the query box. In the query box, paste in the following query:</p><pre>resource.type=&quot;aiplatform.googleapis.com/PipelineJob&quot;<br>jsonPayload.state=&quot;PIPELINE_STATE_FAILED&quot;</pre><p>Click on <strong>Create Alert</strong>. This will bring up a sidebar on the right-hand side called <strong>Create logs-based alert policy</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*ezOw08S4crIR-kYxveWy2w.png" /><figcaption>Fig 2: Setting the Alert details</figcaption></figure><p>This will bring you to Step 1: Give your policy a name, and add a custom message to the <strong>Documentation</strong> field. The custom message supports variables and some notification channels support Markdown syntax. You can learn more about how to use these in the <a href="https://cloud.google.com/monitoring/alerts/doc-variables?_ga=2.174391142.-539158379.1621331047">documentation</a>. Below is an example you can use to provide a link to your broken pipeline in the console:</p><pre># Vertex Pipeline failed</pre><pre>The pipeline ${resource.label.pipeline_job_id} has failed. Click [here](<a href="https://console.cloud.google.com/vertex-ai/locations/$%7Bresource.label.location%7D/pipelines/runs/$%7Bresource.label.pipeline_job_id%7D?project=${project">https://console.cloud.google.com/vertex-ai/locations/${resource.label.location}/pipelines/runs/${resource.label.pipeline_job_id}?project=${project</a>}) to view in the console</pre><p>Click <strong>NEXT</strong> to move to Step 2: <strong>Choose logs to include in the alert</strong>. This should already be filled with the query you used previously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*NsDXqHsxu-rP_B6aKK-_Fg.png" /><figcaption>Fig 3: Choosing logs to include in the alert</figcaption></figure><p>Click <strong>NEXT</strong> to move to Step 3: <strong>Set notification frequency and autoclose duration</strong>. Specify the options here: <strong>Time between notifications</strong> describes the minimum time between notifications (so that you don’t get bombarded by lots of notifications at once!). There is a minimum value of 5 minutes, and this is what we would recommend for pipeline failures. <strong>Incident autoclose duration</strong> describes how long the system should wait to automatically close an incident once matching log entries are absent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*boDjzPOh4W6Ub4rMq8CcDA.png" /><figcaption>Fig 4: Setting notification frequency and autoclose duration</figcaption></figure><p>Click <strong>NEXT</strong> to move to Step 4: <strong>Who should be notified?</strong> In the dropdown box here, choose the notification channel that we set up earlier for email notifications. Finally, click <strong>SAVE</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*v2fbSWrd0gNEcy3yav6jGA.png" /><figcaption>Fig 5: Choosing who should be notified</figcaption></figure><p>Now we have set up our alerting policy, let’s try it out!</p><p>On our local machine, let’s install some Python dependencies:</p><pre>pip install kfp==1.8.12 google-cloud-aiplatform==1.14.0</pre><p>Next, let’s create a very basic Vertex Pipeline that will always fail:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/966754ebec364efbf060a0caa9678f2e/href">https://medium.com/media/966754ebec364efbf060a0caa9678f2e/href</a></iframe><p>As expected, when we run this script, a pipeline is compiled and submitted to Vertex AI, which then fails because of the exception that we have raised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*ApB3nIGixyrEGkcrmNas4A.png" /><figcaption>Fig 7: A broken pipeline</figcaption></figure><p>Oh look, an email notification has come through!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*mgJTs047KQWpwoDHNypUEA.png" /><figcaption>Fig 8: Example alert email for a failed Vertex Pipeline</figcaption></figure><p>If we click on <strong>VIEW INCIDENT</strong>, we are taken back to the console, where we can see that an incident has been created. We have the option to <strong>ACKNOWLEDGE INCIDENT</strong> or <strong>CLOSE INCIDENT</strong>. Acknowledge the incident to let others know that you are looking into the issue. Once you have resolved the problem, you can close the incident.</p><p>That’s it! Now you can run your Vertex Pipelines safe in the knowledge that if there are any issues, you’ll be the first to know. Don’t forget to <a href="https://medium.com/datatonic">follow us on Medium</a> for more Vertex AI Tips and Tricks and much more!</p><p><strong><em>Datatonic are </em></strong><a href="https://datatonic.com/insights/datatonic-google-cloud-specialization-partner-award-machine-learning/"><strong><em>Google Cloud’s Machine Learning Partner of the Year</em></strong></a><strong><em> with a wealth of experience developing and deploying impactful Machine Learning models and MLOps Platform builds. Need help with developing an ML model, or deploying your Machine Learning models fast? Have a look at our </em></strong><a href="https://datatonic.com/insights/vertex-ai-mlops-platform/"><strong><em>MLOps 101 webinar,</em></strong></a><strong><em> where our experts talk you through how to get started with Machine Learning at scale or </em></strong><a href="https://datatonic.com/contact"><strong><em>get in touch</em></strong></a><strong><em> to discuss your ML or MLOps requirements!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e0a277795cf" width="1" height="1" alt=""><hr><p><a href="https://blog.montrealanalytics.com/vertex-ai-tips-and-tricks-setting-up-alerts-for-vertex-pipelines-with-google-cloud-monitoring-3e0a277795cf">Vertex AI Tips and Tricks: Setting Up Alerts for Vertex Pipelines with Google Cloud Monitoring</a> was originally published in <a href="https://blog.montrealanalytics.com/">${around_the_block}</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>