Import a packaged recipe in the Data Science Workspace UI
This tutorial provides insight on how to configure and import a packaged recipe using the provided Retail Sales example. By the end of this tutorial, you will be ready to create, train, and evaluate a Model in Adobe Experience Platform Data Science Workspace.
Prerequisites
This tutorial requires a packaged recipe in the form of a Docker image URL. See the tutorial on how to Package source files into a Recipe for more information.
UI workflow
Importing a packaged recipe into Data Science Workspace requires specific recipe configurations, compiled into a single JavaScript Object Notation (JSON) file, this compilation of recipe configurations is referred to as the configuration file. A packaged recipe with a particular set of configurations is referred to as a recipe instance. One recipe can be used to create many recipe instances in Data Science Workspace.
The workflow for importing a package recipe consists of the following steps:
Configure a recipe configure
Every recipe instance in Data Science Workspace is accompanied with a set of configurations that tailor the recipe instance to suit a particular use case. Configuration files define the default training and scoring behaviors of a Model created using this recipe instance.
Below is a sample configuration file showing default training and scoring behaviors for the Retail Sales recipe.
[
{
"name": "train",
"parameters": [
{
"key": "learning_rate",
"value": "0.1"
},
{
"key": "n_estimators",
"value": "100"
},
{
"key": "max_depth",
"value": "3"
},
{
"key": "ACP_DSW_INPUT_FEATURES",
"value": "date,store,storeType,storeSize,temperature,regionalFuelPrice,markdown,cpi,unemployment,isHoliday"
},
{
"key": "ACP_DSW_TARGET_FEATURES",
"value": "weeklySales"
},
{
"key": "ACP_DSW_FEATURE_UPDATE_SUPPORT",
"value": false
},
{
"key": "tenantId",
"value": "_{TENANT_ID}"
},
{
"key": "ACP_DSW_TRAINING_XDM_SCHEMA",
"value": "{SEE BELOW FOR DETAILS}"
},
{
"key": "evaluation.labelColumn",
"value": "weeklySalesAhead"
},
{
"key": "evaluation.metrics",
"value": "MAPE,MAE,RMSE,MASE"
}
]
},
{
"name": "score",
"parameters": [
{
"key": "tenantId",
"value": "_{TENANT_ID}"
},
{
"key":"ACP_DSW_SCORING_RESULTS_XDM_SCHEMA",
"value":"{SEE BELOW FOR DETAILS}"
}
]
}
]
learning_rate
n_estimators
max_depth
ACP_DSW_INPUT_FEATURES
ACP_DSW_TARGET_FEATURES
ACP_DSW_FEATURE_UPDATE_SUPPORT
tenantId
ACP_DSW_TRAINING_XDM_SCHEMA
evaluation.labelColumn
evaluation.metrics
ACP_DSW_SCORING_RESULTS_XDM_SCHEMA
For the purpose of this tutorial, you can leave the default configuration files for Retail Sales recipe in the Data Science Workspace Reference the way they are.
Import Docker based recipe - Python python
Start by navigating and selecting Workflows located in the top-left of the Platform UI. Next, select Import recipe and select Launch.
The Configure page for the Import recipe workflow appears. Enter a name and description for the recipe then select Next in the top-right corner.
Once you are on the Select source page, paste the Docker URL corresponding to the packaged recipe built using Python source files in the Source URL field. Next, import the provided configuration file by dragging and dropping, or use the file system Browser. The provided configuration file can be found at experience-platform-dsw-reference/recipes/python/retail/retail.config.json
. Select Python in the Runtime drop down and Classification in the Type drop down. Once everything has been filled out, select Next in the top-right corner to proceed to Manage schemas.
Next, select the Retail Sales input and output schemas under the section Manage Schemas, they were created using the provided bootstrap script in the create the retail sales schema and dataset tutorial.
Under the Feature Management section, select on your tenant identification in the schema viewer to expand the Retail Sales input schema. Select the input and output features by highlighting the desired feature, and selecting either Input Feature or Target Feature in the right Field Properties window. For the purpose of this tutorial, set weeklySales as the Target Feature and everything else as Input Feature. Select Next to review your new configured recipe.
Review the recipe, add, modify, or remove configurations as necessary. Select Finish to create the recipe.
Proceed to the next steps to find out how to create a Model in Data Science Workspace using the newly created Retail Sales recipe.
Import Docker based recipe - R r
Start by navigating and selecting Workflows located in the top-left of the Platform UI. Next, select Import recipe and select Launch.
The Configure page for the Import recipe workflow appears. Enter a name and description for the recipe then select Next in the top-right corner.
Once you are on the Select source page, paste the Docker URL corresponding to the packaged recipe built using R source files in the Source URL field. Next, import the provided configuration file by dragging and dropping, or use the file system Browser. The provided configuration file can be found at experience-platform-dsw-reference/recipes/R/Retail\ -\ GradientBoosting/retail.config.json
. Select R in the Runtime drop down and Classification in the Type drop down. Once everything has been filled out, select Next in the top-right corner to proceed to Manage schemas.
Next, select the Retail Sales input and output schemas under the section Manage Schemas, they were created using the provided bootstrap script in the create the retail sales schema and dataset tutorial.
Under the Feature Management section, select on your tenant identification in the schema viewer to expand the Retail Sales input schema. Select the input and output features by highlighting the desired feature, and selecting either Input Feature or Target Feature in the right Field Properties window. For the purpose of this tutorial, set weeklySales as the Target Feature and everything else as Input Feature. Select Next to review your new Configured recipe.
Review the recipe, add, modify, or remove configurations as necessary. Select Finish to create the recipe.
Proceed to the next steps to find out how to create a Model in Data Science Workspace using the newly created Retail Sales recipe.
Import Docker based recipe - PySpark pyspark
Start by navigating and selecting Workflows located in the top-left of the Platform UI. Next, select Import recipe and select Launch.
The Configure page for the Import recipe workflow appears. Enter a name and description for the recipe then select Next in the top-right corner to proceed.
Once you are on the Select source page, paste the Docker URL corresponding to the packaged recipe built using PySpark source files in the Source URL field. Next, import the provided configuration file by dragging and dropping, or use the file system Browser. The provided configuration file can be found at experience-platform-dsw-reference/recipes/pyspark/retail/pipeline.json
. Select PySpark in the Runtime drop down. Once the PySpark runtime is selected the default artifact auto populates to Docker. Next, select Classification in the Type drop down. Once everything has been filled out, select Next in the top-right corner to proceed to Manage schemas.
Next, select the Retail Sales input and output schemas using the Manage Schemas selector, the schemas were created using the provided bootstrap script in the create the retail sales schema and dataset tutorial.
Under the Feature Management section, select on your tenant identification in the schema viewer to expand the Retail Sales input schema. Select the input and output features by highlighting the desired feature, and selecting either Input Feature or Target Feature in the right Field Properties window. For the purpose of this tutorial, set weeklySales as the Target Feature and everything else as Input Feature. Select Next to review your new configured recipe.
Review the recipe, add, modify, or remove configurations as necessary. Select Finish to create the recipe.
Proceed to the next steps to find out how to create a Model in Data Science Workspace using the newly created Retail Sales recipe.
Import Docker based recipe - Scala scala
Start by navigating and selecting Workflows located in the top-left of the Platform UI. Next, select Import recipe and select Launch.
The Configure page for the Import recipe workflow appears. Enter a name and description for the recipe then select Next in the top-right corner to proceed.
Once you are on the Select source page, paste the Docker URL corresponding to the packaged recipe built using Scala source files in the Source URL field. Next, import the provided configuration file by dragging and dropping, or use the file system Browser. The provided configuration file can be found at experience-platform-dsw-reference/recipes/scala/retail/pipelineservice.json
. Select Spark in the Runtime drop down. Once the Spark runtime is selected the default artifact auto populates to Docker. Next, select Regression from the Type drop down. Once everything has been filled out, select Next in the top-right corner to proceed to Manage schemas.
Next, select the Retail Sales input and output schemas using the Manage Schemas selector, the schemas were created using the provided bootstrap script in the create the retail sales schema and dataset tutorial.
Under the Feature Management section, select on your tenant identification in the schema viewer to expand the Retail Sales input schema. Select the input and output features by highlighting the desired feature, and selecting either Input Feature or Target Feature in the right Field Properties window. For the purpose of this tutorial, set “weeklySales” as the Target Feature and everything else as Input Feature. Select Next to review your new configured recipe.
Review the recipe, add, modify, or remove configurations as necessary. Select Finish to create the recipe.
Proceed to the next steps to find out how to create a Model in Data Science Workspace using the newly created Retail Sales recipe.
Next steps next-steps
This tutorial provided insight on configuring and importing a recipe into Data Science Workspace. You can now create, train, and evaluate a Model using the newly created recipe.