Table of contents

WML Deployment operator in a streams flow

The Watson Machine Learning (WML) Deployment operator lists all active online deployments in all deployment spaces.


To get started, perform the following steps:

  1. Create a model and upload it with an input schema definition to WML to a project or space.
  2. Create an online deployment. Then wait until it is ready.

Explore the WML Deployment operator

  1. Select a deployment from the drop down menu.
  2. In the Deployment Input Parameters section, map every model input field to an attribute from the incoming edge schema.
  3. To edit the output schema, perform the following steps:

    a. Open the Schema section.

    b. Click Edit to open the Schema window.

    Note that the attributes of the output schema are mapped automatically to the attributes of the model, if the output schema is defined in IBM Watson Machine Learning for the deployed model. You can manually add or remove model output attributes.

    c. Click Add attributes from incoming schema if you also want to see values that are coming in, in addition to the scored values.


  • Pay attention to input schema types, for example, if a model or deployment expects an integer, then the type must be ‘integer’.
  • Every stream tuple must contain data for one prediction.
  • To find the output schema, use the Deployment page. Use the Test tab to run a prediction and check the results.
  • If a streams flow’s binary field is mapped to a model field, the binary field is sent to WML as a string. If a model field is selected as binary in the output schema, streams flow converts the string to binary.
  • If a model expects an array of values, for example, to predict a two-dimensional pixel image of hand-written digits represented by an array, you can define a model input schema with one field of type array. The mapped streams attribute must be a JSON string of the array.

See the following example from a code operation:

   import json
   submit({ 'data': json.dumps(list(my_numpy_arr)) })