Basic Guide

Other settings and features

Using Flow templates

You can use the Flow Template menu to generate Flows for Machine Learning predictions.

The following image shows an example of a Flow generated from a template.

Example Flow from template

Generate a Flow from the Flow template menu, and you can execute it as-is for making Machine Learning predictions. You can also use the generated Flow as a base and customize it according to your needs.

As of the current release, you can use templates to generate the following types of Flows:

  • Classification predictive Flows
  • Regression predictive Flows
  • Image classification predictive Flows
  • Object detection: manual setup predictive Flows
  • Text classification predictive Flows

Initial preparations

Before using the Flow templates menu, you must do the following:

  • Create a Model Generator, run a training, and click Apply for a trained model.
  • Prepare your prediction input data in one of the following formats:
    Model type Preparations
    Classification/regression

    Prepare your data in one of the following ways:

    • Use the ML Data Editor (export not required)
    • Use BigQuery
    • Upload a CSV (UTF-8 without BOM) file to Google Cloud Storage (GCS)
    Image classification/object detection type: manual setup

    Upload JPEG image files to GCS

    Text classification

    Upload text files to GCS.

As of the current release, Flow Templates support the follow types of Model Generator:

  • Classification
  • Regression
  • Image classification
  • Object detection type: manual setup
  • Text classification

Steps for creating Flows from templates

The basic process for creating Flows from the Flow templates menu is as follows:

Flow templates basic process

Using the Flow templates menu to create a Flow involves configuring items in six menu screens.

The settings within each of these six screens are explained below:

  1. Flow type

    Click the Flow Template button in the Flow Designer header to open the window for using Flow templates. Select the type of prediction you want to make.

  2. Flow name

    Configure the Flow name and memo settings. These will be reflected in the Start of Flow BLOCK’s BLOCK name and properties.

  3. Prediction BLOCK

    Select the Model Generator that will be used for the prediction, then select the type of prediction (online or batch). Batch predictions are recommended when using large amounts of data.

  4. Input data
    • For classification/regression predictions:

      Select where your input data is being stored from among the following:

      • Data Editor
      • BigQuery
      • Google Cloud Storage (GCS)

      There are additional settings depending on your input source:

      Input source Setting
      Data Editor

      Designate your input data’s name.

      BigQuery

      Designate your input data’s dataset and table.

      GCS

      Only CSV (UTF-8 without BOM) can be used, so select CSV for the file format.

      For the GCS URL setting, designate the GCS URL of the file you have uploaded to GCS.

    • For image classification/object detection predictions:

      Input data must be sets of JPEG image files stored in GCS. Select GCS and image for the storage and file type settings.

      Enter the GCS URL for your input data that you have already uploaded to GCS.

      • For batch predictions, enter the path for the folder that contains the image file sets.
      • For online predictions, enter the path for the image file. You can use an asterisk to designate multiple files. For example, gs://my-bucket/my-folder/*.
    • For text classification predictions:

      Input data must be sets of text files stored in GCS. Select GCS and text files for the storage and file type settings.

      • For batch predictions, enter the path for the folder that contains the text files.
      • For online predictions, enter the path for a text file. You can use an asterisk to designate multiple files. For example, gs://my-bucket/my-folder/*.
  5. Output data

    Select where the results will be sent from among the following:

    • Data Editor
    • BigQuery
    • Google Cloud Storage (GCS)
    • Google Sheets

    For image classification, configure the number of labels setting.

    The next steps will change depending on the storage location you select.

    • For the Data Editor:

      If the results will be stored as a new table in the Data Editor, configure the data’s name, dataset, and table. If the results will update existing data, select the data’s name.

    • For BigQuery:

      Designate the dataset and table that will store the results.

    • For Google Cloud Storage (GCS):

      Select the file type (CSV) and enter the destination GCS URL.

    • For Google Sheets:

      Designate the name of the destination spreadsheet and the users/email addresses you will share the file with.

  6. Destination tab

    Select the tab on your Flow Designer that the Flow will be placed into.

Customization

You can freely edit the Flow after it has been created. The input data and output data settings you entered when creating the Flow can be found within the Construct object BLOCK just beneath the Start of Flow BLOCK.

To edit your input data and output data settings, adjust the Data setting of the Construct object BLOCK. You can edit the values of the following items:

Item Type Explanation
input.dataset String

The dataset you configured in the input data settings.

input.table String

The table you configured in the input data settings.

input.gcs_url String

The GCS URL you configured in the input data settings.

output.dataset String

The dataset you configured in the output data settings.

output.table String

The table you configured in the output data settings.

output.gcs_url String

The GCS URL you configured in the output data settings.

info_outline Values for input data and output data settings that are not grouped in the Construct object BLOCK are set directly in the corresponding BLOCK’s corresponding properties.