All Products
Search
Document Center

Platform For AI:Model training

Last Updated:Mar 07, 2024

Machine Learning Designer provides various model components. You can use pipelines to flexibly build, debug, and schedule a model on a regular basis to complete model training. This topic describes how to use Machine Learning Designer to train a model.

Prerequisites

  • A pipeline is created. You can create a blank pipeline or a pipeline from a template based on your business requirements. For more information, see Pipeline overview.

  • The datasets that are required to train the model are prepared. For more information, see Overview.

Background information

To train a model, perform the following steps:

  • Step 1: Build a model

    Machine Learning Designer provides a visual modeling tool (canvas) to build a model, as shown in the following figure.cad84e1ab009c61300493bc140606fbc

    • Machine Learning Designer provides more than one hundred components for modeling. In the left-side component library, find the component that you want to use and drag the component on to the canvas to generate a node.

    • You can establish upstream and downstream relationships between nodes in a pipeline by drawing connecting lines between the nodes.

    • Machine Learning Designer allows you to configure parameters for nodes in a visualized manner. This reduces the skill requirements for developers.

  • Step 2: Debug the model

    In the upper toolbar of the canvas, you can click the Run or View All Tasks icon to run the pipeline or view all tasks of the pipeline. This helps you debug the model while the model is being built or after the model is built. For more information, see Basic features.

Step 1: Build a model

Build a model in a blank pipeline

We recommend that you perform the following steps to plan and build your model in a blank pipeline. You can also use the demos provided in Overview to learn about the modeling process and the operations on the GUI.

  1. Plan nodes for your model.

    A model is composed of multiple tasks. You can create and orchestrate task nodes to build a model that meets your requirements. Before you build a model, we recommend that you plan the nodes of the model. We recommend that you assign an atomic task to each node.

  2. Drag and configure components based on your node plan.

    4b1ade0965ae63b4242ea2c494dc4175

    In the left-side component library, find the component that you want to use and drag the component on to the canvas to generate a node. Then, you can click the node to set the parameters as needed in the right-side panel.

    • Machine Learning Designer provides more than one hundred components that you can use in a variety of scenarios. For example, you can use components to read data, collect statistics, and analyze text. For more information, see Component reference.

    • If specific parameters need to be configured for multiple nodes, you can use global variables to improve the configuration efficiency. For more information, see Advanced feature: global variable.

  3. Draw lines between nodes to form a model pipeline.

    If you drag multiple components to the canvas, multiple nodes are generated. You can draw connecting lines between the nodes to form upstream and downstream relationships between the nodes based on your plan. This determines the order in which the nodes run and how they interact with each other. When you run the pipeline, the pipeline nodes are run in order. Downstream nodes can be run only after all upstream nodes are run.

Build a model in a template pipeline

When you use a template pipeline for modeling, you can use the following types of templates:

  • Preset templates provided by Machine Learning Designer

    Machine Learning Designer provides dozens of preset templates that are developed based on different frameworks to meet requirements in a variety of scenarios. The following items describe the template categories. You can choose a template based on your business requirements.image

    • Categories by sector: Internet, industrial, finance, education, healthcare, and scientific research and development.

    • Categories by algorithm type: classification, regression, and clustering. Categories by framework: TensorFlow and PyTorch.

    • Categories by business domain: recommendation, risk control, user growth, cross validation (CV), natural language processing (NLP), model optimization, Automatic Speech Recognition (ASR), and video.

  • Custom templates available in Machine Learning Designer

  • Exported JSON-formatted template files

    You can add or modify pipeline nodes, and modify node parameters based on your business requirements.

  • Drag a new component from the component library on the left side to the right-side canvas to generate a new node. You can use the node to replace an existing node or connect the node as a downstream node of an existing node.

  • Use the default parameter settings of the nodes, or configure the parameters for the nodes.image

Step 2: Debug the model

After you configure the node parameters for the model pipeline, you can debug the nodes.

  • Debug the model pipeline

    After you configure and connect all nodes, you can click the Run icon in the toolbar of the canvas to run the model. image

  • Debug a single pipeline node

    You can also right-click a node to perform a test run. In the shortcut menu, select an option to determine the scope to which the test run applies. For example, you can select Run from Here or Run Current Node. This improves debugging efficiency.image

  • Troubleshoot run failure

    If a node fails to run, you can right-click the node to view the generated logs for troubleshooting.

  • View running results

    After a node is successfully run, you can right-click the node to view the generated data.

  • View historical tasks

    During modeling, each run is recorded as a historical task. Each historical task records the nodes involved in the run, the configurations of the nodes, and the generated data. You can click View All Tasks on the right side of the toolbar to view the debugging details of all historical tasks.image

    In the Previous Tasks dialog box, find the historical task that you want to manage and click Details in the Actions column. The task details page appears.image

    • You can click the Task details and Task Results tabs to view corresponding details.

    • On the Task details tab, the canvas displays the nodes that were run in the historical task and whether the nodes were successfully run. You can click a node on the canvas to view the details of the node on the right. The details include Operation Info, Job Logs, and Output Result.

    You can find a historical task, click Rollback in the Operation column, and then roll back the model to the status at the time when the historical task was run by following the on-screen instructions.

    Note

    Before you roll back the model pipeline, we recommend that you view the details of the historical task to verify that the version of the model pipeline that you want to roll back is correct. We also recommend that you save and run the model pipeline before you perform a rollback. This generates a task record that contains the latest status. This way, you can roll back the model pipeline to the latest status if an exception occurs during the rollback.

References

  • After you debug a model, you can register the trained model as a new model and manage the model. For more information, see Register and manage models.

  • After you debug a model, you can use the model to perform prediction on new data. For more information, see Overview.

  • On the pipeline configuration tab, you can drag the Update EAS Service component to the canvas as a node and connect the node to other nodes in the pipeline to update the deployed online model service. For more information, see Periodically update online model services.

  • You can submit the pipeline to DataWorks as a periodic task to be automatically run at scheduled points in time. For more information, see Use DataWorks tasks to schedule pipelines in Machine Learning Designer.