---
title: Modify a blueprint
description: Describes how a blueprint works and and the basics of using the blueprint editor.

---

# Modify a blueprint {: #modify-a-blueprint }

This section describes the blueprint editor. A blueprint represents the high-level end-to-end procedure for fitting the model, including any preprocessing steps, modeling, and post-processing steps. The description of the [**Describe > Blueprints**](blueprints) tab provides a detailed explanation of blueprint elements.

![](images/blueprint-uncensored.png)

When you create your own blueprints, DataRobot [validates modifications](#blueprint-validation) to ensure that changes are intentional, not to enforce requirements. As such, blueprints with validation warnings are saved and can be trained, despite the warnings. While this flexibility prevents erroneously constraining you, be aware that a blueprint with warnings is not likely to successfully build a model.

## How a blueprint works {: #how-a-blueprint-works }

Before working with the editor, make sure you understand the kind of data processing a blueprint can handle, the components for building a pipeline, and how tasks within a pipeline work.

### Blueprint data processing abilities {: #blueprint-data-processing-abilities }

A blueprint is designed to implement training pipelines, including modeling, calibration, and model-specific preprocessing steps. Other types of data preparation are best addressed using other tools. When deciding where to implement data processing steps, consider that the following aspects apply to all blueprints:

* Input data is limited to a single post-[EDA2](eda-explained#eda2) dataset. No joins can be defined inside a blueprint. All joins should be accomplished prior to EDA2 (using, for example, [Spark SQL](spark), [Feature Discovery](fd-overview), code, or [Data Prep](companion-tools/index).

* Output data is limited to predictions for the project’s target, as well as information about those predictions ([Prediction Explanations](pred-explain/index)).

* Post-processing that produces output in a different format should be defined outside of the blueprint.

* No filtering or aggregation is allowed inside a blueprint but can be accomplished with [Spark SQL](spark), [Feature Discovery](fd-overview), code, or [Data Prep](companion-tools/index).
	* When scoring new data, a single prediction can only depend on a single row of input data.
	* The number of input and output rows must match.

### Blueprint task types {: #blueprint-task-types }

DataRobot supports two types of tasks&mdash;estimator and transform.

* _Estimator tasks_ predict new value(s) (`y`) by using the input data (`x`). The final task in any blueprint must be an estimator. During scoring, the estimator's output must always align with the target format. For example for multiclass blueprints, an estimator must return a probability of each class for each row.

	Examples of estimator tasks are `LogisticRegression`, `LightGBM regressor`, and `Calibrate`.

* _Transform tasks_ transform the input data (`x`) in some way. Its output is always a dataframe, but unlike estimators, it can contain any number of columns and any data types.

    Examples of transforms are `One-hot encoding`, `Matrix n-gram`, and more.

	Both estimator and transform tasks have a `fit()` method that is used for training and learning data characteristics. For example, a binning task requires `fit()` to define the bins based on training data, and then applies those bins to all future incoming data. While both task types use  the `fit()` method, estimators use a `score()` hook while transform tasks use a `transform()` hook. See the [descriptions of these hooks](cml-custom-tasks#define-task-code) when creating custom tasks for more information.

	Transform and estimator tasks can each be used as intermediate steps inside a blueprint. For example, `Auto-Tuned N-Gram` is an estimator, providing the next task with predictions as input.

### How data passes through a blueprint {: #how-data-passes-through-a-blueprint }

Data is passed through a blueprint sequentially, task by task, left to right. When data is passed to a transform, DataRobot:

1. Fits it on the received data.
2. Uses the trained transform to transform the same data.
3. Passes the result to the next task.

Once passed to an estimator, DataRobot:

1. Fits it on the received data.
2. Uses the trained estimator to predict on the same data.
3. Passes the predictions to the next task. To reduce overfitting, DataRobot passes [stacked predictions](data-partitioning#what-are-stacked-predictions) when the estimator is not the final step in a blueprint.

When the trained blueprint is used to make predictions, data is passed through the same set of steps (with the difference that the `fit()` method is skipped).


## Access the blueprint editor {: #access-the-blueprint-editor }

You can access the blueprint editor from Leaderboard, the Repository, and the AI Catalog.

From the Leaderboard, select a model to use as the basis for further exploration and click to expand (which opens the **Describe > Blueprint** tab). From the Repository, select and expand a model from the library of modeling blueprints available for a selected project. From the AI Catalog, select the **Blueprints** tab to list an inventory of user blueprints.

In either method, once the blueprint diagram is open, choose **Copy and Edit** to open the blueprint editor, which makes a copy of the blueprint.

![](images/cml-blue-2.png)

When you then make modifications, they are made to a copy and the original is left intact (either on the Leaderboard or the Repository, depending on where you opened it from). Click and drag to move the blueprint around on the canvas.

??? note "Why is the editable blueprint different from the original?"
     When a blueprint is generated, it can contain branches for data types that are not present in the current project. Unused branches are pruned (ignored) in that case. These branches _are_ included in the copied blueprint, as they were part of the original (before the pruning) and they may be needed for future projects. For that reason, they are available and visible inside the blueprint editor.

When you have finished editing the blueprint:

* Click **+Add to AI Catalog** if you want to save it to the [AI Catalog](cml-catalog) for further editing, use in other projects, and sharing.
* Click **Train** to run the blueprint and add the resulting model to the Leaderboard.


## Use the blueprint editor {: #use-the-blueprint-editor }

A blueprint is composed of nodes and connectors:

* A [*node*](#work-with-nodes) is the pipeline step&mdash;it takes in data, performs an operation, and outputs the data in its new form. *Tasks* are the elements that complete those actions. From the editor, you can add, remove, and modify tasks and task hyperparameters.

* A [*connector*](#work-with-connectors) is a representation of the flow of data. From the editor, you can add or remove task connectors.

### Work with nodes {: #work-with-nodes }

![](images/cml-node.png)

The following table describes actions you can take on a node.

|Action | Description | How to |
|------ | ----------- | ------ |
| Modify a node | Change characteristics of the task contained in the node. | Hover over a node and click the associated pencil (![](images/icon-pencil.png)) icon. [Edit the task](#modify-a-node) or parameters as needed. |
| Add a node | Add a node to the blueprint. | Hover over the node that will serve as the new node's input and click the plus sign (![](images/icon-plus.png)). This creates a new branch with an empty node. Use the accompanying **Select a task** window to [configure the task](#modify-a-node). |
| Connect nodes | Connect tasks to direct the data flow. | Hover over the starting point node, drag the diagonal arrow (![](images/icon-diagonal-arrow.png)) icon to the end point node, and click. |
| Remove a node | Remove a node and its associated task from the blueprint, as well as downstream nodes. | Hover over a node and click the associated trash can (![](images/icon-trash.png)) icon. If you remove a node, its entire branch is removed (all downstream nodes). Click the undo (![](images/icon-undo.png)) icon on the top left to restore the removed nodes. |

!!! note
    If an action isn't applicable to a node, the icon for the action is not available.

Click the following buttons to undo and redo edits:

|  | Action | Description |
|---|---|---|
| ![](images/icon-undo.png) | Undo | Cancels the most recent action and resets the blueprint graph to its prior state. |
| ![](images/icon-redo.png) | Redo | Restores the most recent action that was undone using the **Undo** action. |

### Work with connectors {: #work-with-connectors }

![](images/cml-connector.png)

The following table describes actions you can take on a connector.

| Action | Description | How to |
|------|----------- |------|
| Add a node | Add a node to the blueprint. | Hover over the connector and click the plus sign (![](images/icon-plus.png)) to create an empty node. Use the accompanying **Select a task** window to [configure the task](#modify-a-node). |
| Remove a connector | Disconnect two nodes. | Hover over a connector and click the resulting trash can (![](images/icon-trash.png)) icon. If the icon does not appear, the connector cannot be deleted because its removal will make the blueprint invalid. |

!!! note
    If an action isn't applicable to a connector, the icon for the action is not available.

### Modify a node {: #modify-a-node }

Use these steps to change an existing node or to add hyperparameters to a node newly added to the blueprint.

1. On the node to be changed, hover to display the task requirements and the available actions.

    ![](images/cml-blue-4.png)

2. Click the pencil icon to open the task window. DataRobot presents a list of all parameters that define the task.

	![](images/cml-blue-5.png)

	The following table describes the actions available from the task window:

	| |Element | Click to...|
	|---|----|---|
	|![](images/icon-1.png)| Open documentation link | Open the model documentation to read a description of the task and its parameters.|
	|![](images/icon-2.png)| [Task selector](#use-the-task-selector)  | Choose an alternative task. Click through the options to select or search for a specific task. To learn about a task, use the **Open documentation** link. |
	|![](images/icon-3.png)| Recommended values | Reset all parameter values to the safe defaults recommended by DataRobot.|
	|![](images/icon-4.png)| Value entry | [Change a parameter](adv-tuning#set-a-parameter) value. When you select a parameter, a dropdown displays acceptable values. Click outside the box to set the new value. |

#### Use the task selector {: #use-the-task-selector }

Click the task name to expand the task finder. Either enter text into the search field or expand the task types to see options listed. If you previously created [custom tasks](cml-custom-tasks), they also are available in the list. You can also [create a task from this modal](#launch-custom-task-creation-workflow) before proceeding.

![](images/cml-blue-6.png)

When you click to select a new task, the blueprint editor loads that task's parameters for editing (if desired). When you are finished, click **Update**. DataRobot replaces the task in the blueprint.

![](images/cml-blue-7.png)

!!! note "Tasks that generate word clouds"
		If you create a blueprint that generates a word cloud in both prediction and non-prediction tasks, DataRobot uses the non-prediction vertex to generate the cloud, since that type is always populated with text inputs. For example, in the blueprint below, both the Auto-Tuned Text Model and the Elastic-Net Regressor include a word cloud. In this case, DataRobot defaults to the Auto-Tuned Text Model's non-prediction word cloud.

		![](images/cml-wordcloud.png)


#### Launch custom task creation workflow {: #launch-custom-task-creation-workflow }

You can access the custom task creation workflow by clicking the **add a custom task** link at the top of the task selector modal. The **Add Custom Task** modal opens in a new browser tab, initiating the [task creation workflow](cml-quickstart#create-a-custom-task).

![](images/cml-qs-4.png)

Once the environment is set and the code is uploaded, close the tab. From the **Select a task** modal, click **Refresh** to make the new task available. You can find it either by expanding the **Custom** dropdown or searching:

![](images/cml-blue-19.png)


### Add a data type {: #add-a-data-type }

You can change input data types available in a blueprint. Click on the **Data** node&mdash;the editor highlights the node and the included data types. Click the pencil icon to select or remove data types:

![](images/cml-blue-8.png)

### Pass selected columns into a task {: #pass-selected-columns-into-a-task }

To pass a single or group of columns into a task, use the Task _Multiple Column Selector_. This task selects specific features in a dataset such that downstream transformations are only applied to a subset of columns. To use this task, add it directly after a data type (for example, directly after “Categorical Variables”), then use the task’s parameters to specify which features should or should not be passed to the next task.

![](images/cml-blue-16.png)

To configure the task, use the **column_names** parameter to specify columns that should or should not be passed to the next task. Use the **method** parameter to specify whether those columns should be included or excluded from the input into the next task. Note that if you need to pass all columns of a certain type to a task, you don't need MCPICK, just connect the task to the data type node.

Click **Add** to see the new task referencing the chosen column(s).

Note that referencing specific columns in a blueprint requires that those columns be present to train the blueprint. DataRobot provides a warning reminder when editing or training a blueprint that the named columns may not be present in the current project.

## Blueprint validation {: #blueprint-validation }

DataRobot validates each node based on the incoming and outgoing edges, checking to ensure that data type, sparse vs. dense data, and shape (number of columns) requirements are met. If you have made changes that cause validation warnings, those affected nodes are displayed in yellow on the blueprint:

![](images/cml-blue-9.png)

Hover on the node to see specifics:

![](images/cml-blue-10.png)

In addition to checking a task's input and output, DataRobot validates that a blueprint doesn't form [cycles](https://en.wikipedia.org/wiki/Directed_acyclic_graph){ target=_blank }. If a cycle is introduced, DataRobot provides a warning, indicating which nodes are causing the issue.

![](images/cml-blue-13.png)

## Train new models {: #train-new-models }

After changes have been made and saved for a blueprint, the option to [train a model](repository#create-a-new-model) using that blueprint becomes available. Click **Train** to open the window and then select a [feature list](feature-lists), sample size, and the number of [folds](data-partitioning#k-fold-cross-validation-cv) used in cross validation. Then, click **Train model**.

The model becomes available to the project on the model Leaderboard. If errors were encountered during model building, DataRobot provides several indicators.

![](images/cml-blue-11.png)

You can view the errored node from the **Describe > Blueprint** tab. Click on the problematic task to see the error message or validation warning.

![](images/cml-blue-12.png)

If a custom task fails, you can find the full error traceback in the [**Describe > Log**](log) tab.

!!! note
    You can train a model even if the blueprint has warnings. To do so, click **Train with warnings**.

## More info... {: #more-info }

The following sections provide details to help ensure successful blueprint creation.


### Boosting {: #boosting }

Boosting is a technique that can improve accuracy by training a model using predictions of another model. It uses multiple estimators together, which in turn either use data in multiple forms or help calibrate predictions.

![](images/cml-blue-15.png)

A boosting pipeline has two key components:

* _Booster task_: A node that boosts the predictions (_Text fit on Residuals (L2/Binomial Deviance)_ in the example above). The list of built-in booster tasks available can be found in the task selector under **Models > Regression > Boosted Regression** (or similarly under the other **Models** sub-categories). For example:

	![](images/cml-blue-14.png)

* _Boosting input_: A node that supplies the prediction to boost (_eXtreme Gradient Boosted Trees Classifier with Early stopping_ in the example) and other tasks that pass extra variables of the booster (_Matrix of word-grams occurrences_).

It must meet the following criteria:

* There must be only one task that provides predictions to boost.

* There must be at least one task providing extra explanatory variables to the booster, other than the predictions (_Matrix of word-grams occurrences_ in the example).
