Set up an ML pipeline by using AI Platform Pipelines
This quickstart provides a brief introduction to AI Platform Pipelines. In this guide, you install Kubeflow Pipelines with TensorFlow Extended on a new Google Kubernetes Engine (GKE) cluster, then run an example pipeline.
This topic is intended for users who are new to AI Platform Pipelines.
Before you begin
Before following this guide, check that your Google Cloud project is correctly set up and that you have sufficient permissions to deploy AI Platform Pipelines.
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Use the following instructions to check if you have been granted the
roles required to deploy AI Platform Pipelines.
-
Open a Cloud Shell session.
Cloud Shell opens in a frame at the bottom of the Google Cloud console.
-
You must have the Viewer (
roles/viewer
) and Kubernetes Engine Admin (roles/container.admin
) roles on the project, or other roles that include the same permissions such as the Owner (roles/owner
) role on the project, to deploy AI Platform Pipelines. Run the following command in Cloud Shell to list the principals that have the Viewer and Kubernetes Engine Admin roles.gcloud projects get-iam-policy PROJECT_ID \ --flatten="bindings[].members" --format="table(bindings.role, bindings.members)" \ --filter="bindings.role:roles/container.admin OR bindings.role:roles/viewer"
Replace PROJECT_ID with the ID of your Google Cloud project.
Use the output of this command to verify that your account has the Viewer and Kubernetes Engine Admin roles.
-
If you have not been granted the required roles, contact your Google Cloud project administrator for additional help.
Learn more about granting Identity and Access Management roles.
-
Set up your AI Platform Pipelines instance
Use the following instructions to set up AI Platform Pipelines on a new GKE cluster.
Open AI Platform Pipelines in the Google Cloud console.
Click Select project. A dialog prompting you to select a Google Cloud project appears.
Select the Google Cloud project you want to use for this quickstart, then click Open.
In the AI Platform Pipelines toolbar, click New instance. Kubeflow Pipelines opens in Google Cloud Marketplace.
Click Configure. A form opens for you to configure your Kubeflow Pipelines deployment.
If the Create a new cluster link is displayed, click Create a new cluster. Otherwise, continue to the next step.
Select us-central1-a as the Cluster zone where your GKE cluster should be created.
Check Allow access to the following Cloud APIs to grant applications that run on your GKE cluster access to Google Cloud resources. By checking this box, you are granting your cluster access to the
https://www.googleapis.com/auth/cloud-platform
access scope. This access scope provides full access to the Google Cloud resources that you have enabled in your project. Granting your cluster access to Google Cloud resources in this manner saves you the effort of creating a Kubernetes secret.Click Create cluster to create your GKE cluster. This process takes several minutes to complete.
After your cluster has been created, supply the following information:
- Namespace: Select default as the namespace.
- App instance name: Enter pipelines-quickstart as the instance name.
Click Deploy to deploy Kubeflow Pipelines onto your new GKE cluster.
The deployment process takes several minutes to complete. After the deployment process is finished, continue to the next section.
Run an example pipeline
Use the following instructions to run an example pipeline in your new AI Platform Pipelines instance.
Open AI Platform Pipelines in the Google Cloud console.
Find the AI Platform Pipelines cluster named pipelines-quickstart, then click Open pipelines dashboard to open Kubeflow Pipelines. The Kubeflow Pipelines dashboard opens, displaying the Getting Started page.
You can use the Getting Started page in the dashboard to learn more about the demonstration and tutorial pipelines that are provided with Kubeflow Pipelines, or learn more about how to create a pipeline.
In the left navigation panel, click Pipelines.
Kubeflow Pipelines provides several example pipelines. Click [Tutorial] Data passing in python components. A graph displaying the steps in the pipeline opens.
To run the pipeline once, click Create run. In Kubeflow Pipelines, a run is a single execution of a pipeline. A form where you enter the run details opens.
Enter "Quickstart pipeline run" as the Run name.
Click Start. The pipelines dashboard displays a list of pipeline runs on the Experiments page. In Kubeflow Pipelines, you can use experiments to organize your pipeline runs into logical groups.
Click the run named Quickstart pipeline run. The graph of your run is displayed. While your run is still in progress, the graph changes as each step executes.
Click the pipeline steps to explore your run's inputs, outputs, logs, etc.
You have now run an example pipeline in your AI Platform Pipelines instance.
Clean up
To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.
To avoid incurring more charges to your Google Cloud account, use the following instructions to delete the AI Platform Pipelines instance and GKE cluster that you created in the preceding sections.Open AI Platform Pipelines in the Google Cloud console.
Select the checkbox for the AI Platform Pipelines instance named pipelines-quickstart.
In the AI Platform Pipelines toolbar, click Delete.
In the Delete Kubeflow Pipelines from cluster dialog, select the Delete cluster checkbox. Selecting this checkbox indicates that you want to delete the GKE cluster you created for this quickstart.
Click Delete to delete your AI Platform Pipelines instance and GKE cluster.
What's next
- Learn more about AI Platform Pipelines and ML pipelines by reading the introduction to AI Platform Pipelines.
- Orchestrate your ML process as a pipeline.