C3 AI Documentation Home

Load SparkML Model

Import a model trained with Spark MLIB from Azure Data Lake Storage (ADLS) to Visual Notebooks. You must have an existing ADLS account and saved model to use this node. For more information about ADLS, see Azure Data Lake Storage.

Prerequisites

Follow the steps below to connect your ADLS account to Visual Notebooks and load the desired Spark ML model.

  1. In Visual Notebooks, drag the Load SparkML Model node onto the canvas
  2. Select the gear icon beside the Credential field Example
  3. Select the plus sign in the upper right corner Example
  4. Paste the contents of the storage account name into Account Name and key into Account Key Example

Configuration

FieldDescription
Name default=noneName of the node An optional user-specified node name displayed in the canvas, both on the node and in the dataframe as a tab.
Credential *RequiredThe information needed to access ADLS and load the model Select a saved credential from the dropdown menu. Select the gear icon to add a new credential or delete existing credentials.
Path *RequiredThe path to the model to load Select the bucket and the desired folder from the pop-up menu.

Node Inputs/Outputs

InputA Visual Notebooks dataframe
OutputA dataframe with a column appended with the prediction from the loaded model

Example output

Figure 1: Example output

Example output

Figure 2: Example setup

Examples

Follow the steps below to use a Spark ML model from ADLS.

  1. Select the saved credentials used to access ADLS. If you have not yet saved credentials, follow the steps in the Prerequisites section above.
  2. Select the saved Spark ML model using the Path field.
  3. Select Run to create a dataframe and perform inference.

Example output

Figure 3: Example configuration

Example dataframe with default settings

Figure 4: Example dataframe with predictions

Was this page helpful?