0 / 0
Quick start: Automate the lifecycle for a model with pipelines

Quick start: Automate the lifecycle for a model with pipelines

You can create an end-to-end pipeline to deliver concise, pre-processed, and up-to-date data stored in an external data source. Read about Orchestration Pipelines, then watch a video and take a tutorial.

Required services
Watson Studio
Watson Machine Learning

Your basic workflow includes these tasks:

  1. Open your sandbox project. Projects are where you can collaborate with others to work with data.
  2. Add connections and data to the project. You can add CSV files or data from a remote data source through a connection.
  3. Create a pipeline in the project.
  4. Add nodes to the pipeline to perform tasks.
  5. Run the pipeline and view the results.

Read about pipelines

The Pipelines editor provides a graphical interface for orchestrating an end-to-end flow of assets from creation through deployment. Assemble and configure a pipeline to create, train, deploy, and update machine learning models and Python scripts. Putting a model into production is a multi-step process. Data must be loaded and processed, models must be trained and tuned before they are deployed and tested. Machine learning models require more observation, evaluation, and updating over time to avoid bias or drift.

Read more about pipelines

Learn about other ways to build models

Watch a video about pipelines

Watch Video Watch this video to preview the steps in this tutorial. You might notice slight differences in the user interface that is shown in the video. The video is intended to be a companion to the written tutorial.

This video provides a visual method to learn the concepts and tasks in this documentation.


Try a tutorial to create a model with Pipelines

This tutorial guides you through exploring and running an AI pipeline to build and deploy a model. The model predicts if a customer is likely subscribe to a term deposit based on a marketing campaign.

In this tutorial, you will complete these tasks:

This tutorial takes approximately 30 minutes to complete.

Sample data

The sample data that is used in the guided experience is UCI: Bank marketing data used to predict whether a customer enrolls in a marketing promotion.

Spreadsheet of the Bank marketing data set





Tips for completing this tutorial Here are some tips for successfully completing this tutorial.

Use the video picture-in-picture

Tip: Start the video, then as you scroll through the tutorial, the video moves to picture-in-picture mode. Close the video table of contents for the best experience with picture-in-picture. You can use picture-in-picture mode so you can follow the video as you complete the tasks in this tutorial. Click the timestamps for each task to follow along.

The following animated image shows how to use the video picture-in-picture and table of contents features:

How to use picture-in-picture and chapters

Get help in the community

If you need help with this tutorial, you can ask a question or find an answer in the watsonx Community discussion forum.

Set up your browser windows

For the optimal experience completing this tutorial, open Cloud Pak for Data in one browser window, and keep this tutorial page open in another browser window to switch easily between the two applications. Consider arranging the two browser windows side-by-side to make it easier to follow along.

Side-by-side tutorial and UI

Tip: If you encounter a guided tour while completing this tutorial in the user interface, click Maybe later.



Task 1: Open a project

You need a project to store Prompt Lab assets.

Watch a video to see how to create a sandbox project and associate a service. Then follow the steps to verify that you have an existing project or create a sandbox project.

This video provides a visual method to learn the concepts and tasks in this documentation.

  1. From the watsonx home screen, scroll to the Projects section. If you see any projects listed, then skip to Task 2. If you don't see any projects, then follow these steps to create a project.

  2. Click Create a sandbox project. When the project is created, you will see the sandbox project in the Projects section.

For more information or to watch a video, see Creating a project.

Checkpoint icon Check your progress

The following image shows the home screen with the sandbox listed in the Projects section. You are now ready to open the Prompt Lab.

Home screen with sandbox project listed.




Task 2: Create a deployment space

preview tutorial video To preview this task, watch the video beginning at 00:16.

Deployment spaces help you to organize supporting resources such as input data and environments; deploy models or functions to generate predictions or solutions; and view or edit deployment details. Follow these steps to create a deployment space.

  1. From the watsonx navigation menu Navigation menu, choose Deployments. If you have an existing deployment space, you can skip to Task 2.

  2. Click New deployment space.

  3. Type a name for your deployment space.

  4. Select a storage service from the list.

  5. Select your provisioned machine learning service from the list.

  6. Click Create.

Checkpoint icon Check your progress

The following image shows the empty deployment space:

The following image shows the empty deployment space.




Task 3: Create the sample pipeline

preview tutorial video To preview this task, watch the video beginning at 00:08.

You create and run pipelines in a project. Follow these steps to create a pipeline based on a sample in a project:

  1. On the watsonx home page, select your sandbox or a different existing project from the drop down list.

    Project list drop down

  2. Click Customize my journey, and then select View all tasks.

  3. Select Automate model lifecycle.

  4. Click Resource hub sample.

  5. Select Orchestrate an AutoAI experiment, and click Next.

  6. Optional: Change the name for the pipeline.

  7. Click Create. The sample pipeline gets training data, trains a machine learning model by using the AutoAI tool, and selects the best pipeline to save as a model. The model is deployed to a space.

Checkpoint icon Check your progress

The following image shows the sample pipeline.

The following image shows the sample pipeline.




Task 4: Explore the existing pipeline

preview tutorial video To preview this task, watch the video beginning at 00:30.

The sample pipeline includes several nodes to create assets and use those assets to build a model. Follow these steps to view the nodes:

  1. Click the Global objects icon Global objects to view the pipeline parameters. Expand the deployment_space parameter. This pipeline includes a parameter to specify a deployment space where the best model from the AutoAI experiment is stored and deployed. Click the X to close the window.

  2. Double-click the Create data file node to see that it is configured to access the data set for the experiment. Click Cancel to close the properties pane.

  3. Double-click the Create AutoAI experiment node. View the experiment name, the scope, which is where the experiment is stored, the prediction type (binary classification, multiclass classification, or regression), the prediction column, and positive class. The rest of the parameters are all optional. Click Cancel to close the properties pane.

  4. Double-click the Run AutoAI experiment node. This node runs the AutoAI experiment onboarding-bank-marketing-prediction, trains the pipelines, then saves the best model. The first two parameters are required. The first parameter takes the output from the Create AutoAI experiment node as the input to run the experiment. The second parameter takes the output from the Create data file node as the training data input for the experiment. The rest of the parameters are all optional. Click Cancel to close the properties pane.

  5. Double-click the Create Web service node. This node creates a deployment with the name onboarding-bank-marketing-prediction-deployment. The first parameter takes the best model output from the Run AutoAI experiment node as the input to create the deployment with the specified name. The rest of the parameters are all optional. Click Cancel to close the properties pane.

Checkpoint icon Check your progress

The following image shows the properties for the Create web service node. You are now ready to run the sample pipeline.

The following image the properties for the Create web service node.




Task 5: Run the pipeline

preview tutorial video To preview this task, watch the video beginning at 03:43.

Now that the pipeline is complete, follow these steps to run the pipeline:

  1. From the toolbar, click Run pipeline > Trial run.

  2. In the Values for pipeline parameters section, select your deployment space:

    1. Click Select Space.

    2. Click Spaces.

    3. Select your deployment space from Task 1.

    4. Click Choose.

  3. Provide an API key if this occasion is your first time running a pipeline. Pipeline assets use your personal IBM Cloud API key to run operations securely without disruption.

    • If you have an existing API key, click Use existing API key, paste the API key, and click Save.

    • If you don't have an existing API key, click Generate new API key, provide a name, and click Save. Copy the API key, and then save the API key for future use. When you're done, click Close.

  4. Click Run to start running the pipeline.

  5. Monitor the pipeline progress.

    1. Scroll through consolidated logs while the pipeline is running. The trial run might take up to 10 minutes to complete.

    2. As each operation completes, select the node for that operation on the canvas.

    3. On the Node Inspector tab, view the details of the operation.

    4. Click the Node output tab to see a summary of the output for each node operation.

Checkpoint icon Check your progress

The following image shows the pipeline after it completed the trial run. You are now ready to review the assets that the pipeline created.

Completed run of pipeline




Task 6: View the assets, deployed model, and online deployment

preview tutorial video To preview this task, watch the video beginning at 04:27.

The pipeline created several assets in the deployment space. Follow these steps to view the assets:

  1. From the watsonx navigation menu Navigation menu, choose Deployments.

  2. Click the name for your deployment space.

  3. On the Assets tab, view All assets.

  4. Click the bank-marketing-data.csv data asset. The Create data file node created this asset.

  5. Click the model beginning with the name onboarding-bank-marketing-prediction. The Run AutoAI experiment node generated several model candidates, and chose this as the best model.

  6. Click the Model details tab, and scroll through the model and training information.

  7. Click the Deployments tab, and open the onboarding-bank-marketing-prediction-deployment.

    1. Click the Test tab.

    2. Click the JSON input tab.

    3. Replace the sample text with the following JSON text, and click Predict.

      {
        "input_data": [
                {
                        "fields": [
                                "age",
                                "job",
                                "marital",
                                "education",
                                "default",
                                "balance",
                                "housing",
                                "loan",
                                "contact",
                                "day",
                                "month",
                                "duration",
                                "campaign",
                                "pdays",
                                "previous",
                                "poutcome"
                        ],
                        "values": [
                                [
                                        35,
                                        "management",
                                        "married",
                                        "tertiary",
                                        "no",
                                        0,
                                        "yes",
                                        "no",
                                        "cellular",
                                        1,
                                        "jun",
                                        850,
                                        10,
                                        -1,
                                        4,
                                        "unknown"
                                ]
                        ]
                }
        ]
      }
      

Checkpoint icon Check your progress

The following image shows the results of the test; the prediction is to approve the applicant. The confidence scores for your test might be different from the scores that are shown in the image.

Test results predictions



Next steps

Learn more

Parent topic: Quick start tutorials

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more