Skip to content

Blueprints

Blueprint

Blueprint

class datarobot.models.Blueprint

A Blueprint which can be used to fit models

Variables

Attribute Type Description
id str the ID of the blueprint
processes List[str] the processes used by the blueprint
model_type str the model produced by the blueprint
project_id str the project the blueprint belongs to
blueprint_category str (New in version v2.6) Describes the category of the blueprint and the kind of model it produces.
recommended_featurelist_id str or null (New in v2.18) The ID of the feature list recommended for this blueprint. If this field is not present, then there is no recommended feature list.
supports_composable_ml bool or None (New in version v2.26) whether this blueprint is supported in the Composable ML.
supports_incremental_learning bool or None (New in version v3.3) whether this blueprint supports incremental learning.

get()

classmethod get()

Retrieve a blueprint.

Parameters

Parameter Type Description
project_id str The project’s id.
blueprint_id str Id of blueprint to retrieve.

Returns

Returns Description
blueprint The queried blueprint.

Return type: Blueprint

get_json()

method get_json()

Get the blueprint json representation used by this model.

Returns

Returns Description
Json representation of the blueprint stages.

Return type: BlueprintJson

get_chart()

method get_chart()

Retrieve a chart.

Returns

Returns Description
The current blueprint chart.

Return type: BlueprintChart

get_documents()

method get_documents()

Get documentation for tasks used in the blueprint.

Returns

Returns Description
All documents available for blueprint.

Return type: list of BlueprintTaskDocument

from_data()

classmethod from_data()

Instantiate an object of this class using a dict.

Parameters

Parameter Type Description
data dict Correctly snake_cased keys and their values.

Return type: TypeVar(T, bound= APIObject)

from_server_data()

classmethod from_server_data()

Instantiate an object of this class using the data directly from the server, meaning that the keys may have the wrong camel casing

Parameters

Parameter Type Description
data dict The directly translated dict of JSON from the server. No casing fixes have taken place
keep_attrs iterable List, set or tuple of the dotted namespace notations for attributes to keep within the object structure even if their values are None

Return type: TypeVar(T, bound= APIObject)

BlueprintTaskDocument

class datarobot.models.BlueprintTaskDocument

Document describing a task from a blueprint.

Variables

Attribute Type Description
title str Title of document.
task str Name of the task described in document.
description str Task description.
parameters list of dict(name, type, description) Parameters that task can receive in human-readable format.
links list of dict(name, url) External links used in document
references list of dict(name, url) References used in document. When no link available url equals None.

BlueprintChart

class datarobot.models.BlueprintChart

A Blueprint chart that can be used to understand data flow in blueprint.

Variables

Attribute Type Description
nodes list of dict (id, label) Chart nodes, id unique in chart.
edges list of tuple (id1, id2) Directions of data flow between blueprint chart nodes.

get()

classmethod get()

Retrieve a blueprint chart.

Parameters

Parameter Type Description
project_id str The project’s id.
blueprint_id str Id of blueprint to retrieve chart.

Returns

Returns Description
The queried blueprint chart.

Return type: BlueprintChart

to_graphviz()

method to_graphviz()

Get blueprint chart in graphviz DOT format.

Returns

Returns Description
String representation of chart in graphviz DOT language.

Return type: unicode

ModelBlueprintChart

class datarobot.models.ModelBlueprintChart

A Blueprint chart that can be used to understand data flow in model. Model blueprint chart represents reduced repository blueprint chart with only elements that used to build this particular model.

Variables

Attribute Type Description
nodes list of dict (id, label) Chart nodes, id unique in chart.
edges list of tuple (id1, id2) Directions of data flow between blueprint chart nodes.

get()

classmethod get()

Retrieve a model blueprint chart.

Parameters

Parameter Type Description
project_id str The project’s id.
model_id str Id of model to retrieve model blueprint chart.

Returns

Returns Description
The queried model blueprint chart.

Return type: ModelBlueprintChart

to_graphviz()

method to_graphviz()

Get blueprint chart in graphviz DOT format.

Returns

Returns Description
String representation of chart in graphviz DOT language.

Return type: unicode

User blueprints

UserBlueprint

class datarobot.UserBlueprint

A representation of a blueprint which may be modified by the user, saved to a user’s AI Catalog, trained on projects, and shared with others.

It is recommended to install the python library called datarobot_bp_workshop, available via pip, for the best experience when building blueprints.

Please refer to http://blueprint-workshop.datarobot.com for tutorials, examples, and other documentation.

Parameters

Parameter Type Description
blender bool Whether the blueprint is a blender.
blueprint_id string The deterministic id of the blueprint, based on its content.
custom_task_version_metadata list[list[string]], Optional An association of custom entity ids and task ids.
diagram string The diagram used by the UI to display the blueprint.
features list[string] A list of the names of tasks used in the blueprint.
features_text string A description of the blueprint via the names of tasks used.
hex_column_name_lookup list[UserBlueprintsHexColumnNameLookupEntry], Optional A lookup between hex values and data column names used in the blueprint.
icons list[int] The icon(s) associated with the blueprint.
insights string An indication of the insights generated by the blueprint.
is_time_series bool (Default=False) Whether the blueprint contains time-series tasks.
model_type string The generated or provided title of the blueprint.
project_id string, Optional The id of the project the blueprint was originally created with, if applicable.
reference_model bool (Default=False) Whether the blueprint is a reference model.
shap_support bool (Default=False) Whether the blueprint supports shapley additive explanations.
supported_target_types (list[enum(```’binary’, 'multiclass'`, `'multilabel'`, `'nonnegative',`)
'regression' The list of supported targets of the current blueprint.
'unsupervised' The list of supported targets of the current blueprint.
'unsupervisedclustering' )] – The list of supported targets of the current blueprint.
supports_gpu bool (Default=False) Whether the blueprint supports execution on the GPU.
user_blueprint_id string The unique id associated with the user blueprint.
user_id string The id of the user who owns the blueprint.
blueprint list[dict] or list[UserBlueprintTask], Optional The representation of a directed acyclic graph defining a pipeline of data through tasks and a final estimator.
vertex_context list[VertexContextItem], Optional Info about, warnings about, and errors with a specific vertex in the blueprint.
blueprint_context VertexContextItemMessages Warnings and errors which may describe or summarize warnings or errors in the blueprint’s vertices

list()

classmethod list()

Fetch a list of the user blueprints the current user created

Parameters

Parameter Type Description
limit int (Default=100) The max number of results to return.
offset int (Default=0) The number of results to skip (for pagination).
project_id string, Optional The id of the project, used to filter for original project_id.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: list[UserBlueprint]

get()

classmethod get()

Retrieve a user blueprint

Parameters

Parameter Type Description
user_blueprint_id string Used to identify a specific user-owned blueprint.
project_id string (optional, default is None) String representation of ObjectId for a given project. Used to validate selected columns in the user blueprint.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprint

create()

classmethod create()

Create a user blueprint

Parameters

Parameter Type Description
blueprint list[dict] or list[UserBlueprintTask] A list of tasks in the form of dictionaries which define a blueprint.
model_type string, Optional The title to give to the blueprint.
project_id string, Optional The project associated with the blueprint. Necessary in the event of project specific tasks, such as column selection tasks.
save_to_catalog bool, (Default=True) Whether the blueprint being created should be saved to the catalog.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprint

create_from_custom_task_version_id()

classmethod create_from_custom_task_version_id()

Create a user blueprint with a single custom task version

Parameters

Parameter Type Description
custom_task_version_id string Id of custom task version from which the user blueprint is created
save_to_catalog bool, (Default=True) Whether the blueprint being created should be saved to the catalog
description string (Default=None) The description for the user blueprint that will be created from the custom task version.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprint

clone_project_blueprint()

classmethod clone_project_blueprint()

Clone a blueprint from a project.

Parameters

Parameter Type Description
blueprint_id string The id associated with the blueprint to create the user blueprint from.
model_type string, Optional The title to give to the blueprint.
project_id string The id of the project which the blueprint to copy comes from.
save_to_catalog bool, (Default=True) Whether the blueprint being created should be saved to the catalog.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprint

clone_user_blueprint()

classmethod clone_user_blueprint()

Clone a user blueprint.

Parameters

Parameter Type Description
model_type string, Optional The title to give to the blueprint.
project_id string, Optional String representation of ObjectId for a given project. Used to validate selected columns in the user blueprint.
user_blueprint_id string The id of the existing user blueprint to copy.
save_to_catalog bool, (Default=True) Whether the blueprint being created should be saved to the catalog.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprint

update()

classmethod update()

Update a user blueprint

Parameters

Parameter Type Description
blueprint list(dict) or list(UserBlueprintTask) A list of tasks in the form of dictionaries which define a blueprint. If None, will not be passed.
model_type string, Optional The title to give to the blueprint. If None, will not be passed.
project_id string, Optional The project associated with the blueprint. Necessary in the event of project specific tasks, such as column selection tasks. If None, will not be passed. To explicitly pass None, pass True to include_project_id_if_none (useful if unlinking a blueprint from a project)
user_blueprint_id string Used to identify a specific user-owned blueprint.
include_project_id_if_none bool (Default=False) Allows project_id to be passed as None, instead of ignored. If set to False, will not pass project_id in the API request if it is set to None. If True, the project id will be passed even if it is set to None.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprint

delete()

classmethod delete()

Delete a user blueprint, specified by the userBlueprintId.

Parameters

Parameter Type Description
user_blueprint_id string Used to identify a specific user-owned blueprint.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: requests.models.Response

get_input_types()

classmethod get_input_types()

Retrieve the input types which can be used with User Blueprints.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintAvailableInput

add_to_project()

classmethod add_to_project()

Add a list of user blueprints, by id, to a specified (by id) project’s repository.

Parameters

Parameter Type Description
project_id string The projectId of the project for the repository to add the specified user blueprints to.
user_blueprint_ids list(string) or string The ids of the user blueprints to add to the specified project’s repository.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintAddToProjectMenu

get_available_tasks()

classmethod get_available_tasks()

Retrieve the available tasks, organized into categories, which can be used to create or modify User Blueprints.

Parameters

Parameter Type Description
project_id (string, Optional)
user_blueprint_id (string, Optional)

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintAvailableTasks

validate_task_parameters()

classmethod validate_task_parameters()

Validate that each value assigned to specified task parameters are valid.

Parameters

Parameter Type Description
output_method enum(```’P’, 'Pm'`, `'S'`, `'Sm'`, `'T'`, `'TS')` The method representing how the task will output data.
task_code string The task code representing the task to validate parameter values.
task_parameters list(UserBlueprintTaskParameterValidationRequestParamItem) A list of task parameters and proposed values to be validated.
project_id string (optional, default is None) The projectId representing the project where this user blueprint is edited.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintValidateTaskParameters

list_shared_roles()

classmethod list_shared_roles()

Get a list of users, groups and organizations that have an access to this user blueprint

Parameters

Parameter Type Description
id Optional[str] Only return the access control information for a organization, group or user with this ID.
limit int (Default=100) At most this many results are returned.
name string, Optional Only return the access control information for a organization, group or user with this name.
offset int (Default=0) This many results will be skipped.
share_recipient_type enum(```’user’, 'group'`, `'organization'),Optional` Describes the recipient type, either user, group, or organization.
user_blueprint_id str Used to identify a specific user-owned blueprint.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: list[UserBlueprintSharedRolesResponseValidator]

validate_blueprint()

classmethod validate_blueprint()

Validate a user blueprint and return information about the inputs expected and outputs provided by each task.

Parameters

Parameter Type Description
blueprint list(dict) or list(UserBlueprintTask) The representation of a directed acyclic graph defining a pipeline of data through tasks and a final estimator.
project_id string (optional, default is None) The projectId representing the project where this user blueprint is edited.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: list[VertexContextItem]

update_shared_roles()

classmethod update_shared_roles()

Share a user blueprint with a user, group, or organization

Parameters

Parameter Type Description
user_blueprint_id str Used to identify a specific user-owned blueprint.
roles list(or(GrantAccessControlWithUsernameValidator, GrantAccessControlWithIdValidator)) Array of GrantAccessControl objects., up to maximum 100 objects.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: requests.models.Response

search_catalog()

classmethod search_catalog()

Fetch a list of the user blueprint catalog entries the current user has access to based on an optional search term, tags, owner user info, or sort order.

Parameters

Parameter Type Description
search string, Optional. A value to search for in the dataset’s name, description, tags, column names, categories, and latest error. The search is case insensitive. If no value is provided for this parameter, or if the empty string is used, or if the string contains only whitespace, no filtering will be done. Partial matching is performed on dataset name and description fields while all other fields will only match if the search matches the whole value exactly.
tag string, Optional. If provided, the results will be filtered to include only items with the specified tag.
limit int, Optional. (default: 0), at most this many results are returned. To specify no limit, use 0. The default may change and a maximum limit may be imposed without notice.
offset (int, Optional. (default: 0), this many results will be skipped.)
owner_user_id string, Optional. Filter results to those owned by one or more owner identified by UID.
owner_username string, Optional. Filter results to those owned by one or more owner identified by username.
order_by string, Optional. Defaults to `'-created'``` Sort order which will be applied to catalog list, valid options are “catalogName”, “originalName”, “description”, “created”, and “relevance”. For all options other than relevance, you may prefix the attribute name with a dash to sort in descending order. e.g., orderBy=’-catalogName’.

Return type: UserBlueprintCatalogSearch

UserBlueprintAvailableInput

class datarobot.models.user_blueprints.models.UserBlueprintAvailableInput

Retrieve the input types which can be used with User Blueprints.

Parameters

Parameter Type Description
input_types list(UserBlueprintsInputType) A list of associated pairs of an input types and their human-readable names.

get_input_types()

classmethod get_input_types()

Retrieve the input types which can be used with User Blueprints.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintAvailableInput

UserBlueprintAddToProjectMenu

class datarobot.models.user_blueprints.models.UserBlueprintAddToProjectMenu

Add a list of user blueprints, by id, to a specified (by id) project’s repository.

Parameters

Parameter Type Description
added_to_menu list(UserBlueprintAddedToMenuItem) The list of userBlueprintId and blueprintId pairs representing blueprints successfully added to the project repository.
not_added_to_menu list(UserBlueprintNotAddedToMenuItem) The list of userBlueprintId and error message representing blueprints which failed to be added to the project repository.
message string A success message or a list of reasons why the list of blueprints could not be added to the project repository.

add_to_project()

classmethod add_to_project()

Add a list of user blueprints, by id, to a specified (by id) project’s repository.

Parameters

Parameter Type Description
project_id string The projectId of the project for the repository to add the specified user blueprints to.
user_blueprint_ids list(string) The ids of the user blueprints to add to the specified project’s repository.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintAddToProjectMenu

UserBlueprintAvailableTasks

class datarobot.models.user_blueprints.models.UserBlueprintAvailableTasks

Retrieve the available tasks, organized into categories, which can be used to create or modify User Blueprints.

Parameters

Parameter Type Description
categories list(UserBlueprintTaskCategoryItem) A list of the available task categories, sub-categories, and tasks.
tasks list(UserBlueprintTaskLookupEntry) A list of task codes and their task definitions.

get_available_tasks()

classmethod get_available_tasks()

Retrieve the available tasks, organized into categories, which can be used to create or modify User Blueprints.

Parameters

Parameter Type Description
project_id (string, Optional)
user_blueprint_id (string, Optional)

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintAvailableTasks

UserBlueprintValidateTaskParameters

class datarobot.models.user_blueprints.models.UserBlueprintValidateTaskParameters

Validate that each value assigned to specified task parameters are valid.

Parameters

Parameter Type Description
errors list(UserBlueprintsValidateTaskParameter) A list of the task parameters, their proposed values, and messages describing why each is not valid.

validate_task_parameters()

classmethod validate_task_parameters()

Validate that each value assigned to specified task parameters are valid.

Parameters

Parameter Type Description
output_method enum(```’P’, 'Pm'`, `'S'`, `'Sm'`, `'T'`, `'TS')` The method representing how the task will output data.
task_code string The task code representing the task to validate parameter values.
task_parameters list(UserBlueprintTaskParameterValidationRequestParamItem) A list of task parameters and proposed values to be validated.
project_id string (optional, default is None) The projectId representing the project where this user blueprint is edited.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: UserBlueprintValidateTaskParameters

UserBlueprintSharedRolesResponseValidator

class datarobot.models.user_blueprints.models.UserBlueprintSharedRolesResponseValidator

A list of SharedRoles objects.

Parameters

Parameter Type Description
share_recipient_type enum(```’user’, 'group'`, `'organization')` Describes the recipient type, either user, group, or organization.
role str, one of enum(```’CONSUMER’, 'EDITOR'`, `'OWNER')` The role of the org/group/user on this dataset or “NO_ROLE” for removing access when used with route to modify access.
id str The ID of the recipient organization, group or user.
name string The name of the recipient organization, group or user.

VertexContextItem

class datarobot.models.user_blueprints.models.VertexContextItem

Info about, warnings about, and errors with a specific vertex in the blueprint.

Parameters

Parameter Type Description
task_id string The id associated with a specific vertex in the blueprint.
information (VertexContextItemInfo)
messages (VertexContextItemMessages)

UserBlueprintCatalogSearch

class datarobot.models.user_blueprints.models.UserBlueprintCatalogSearch

An APIObject representing a user blueprint catalog entry the current user has access to based on an optional search term and/or tags.

Parameters

Parameter Type Description
id str The ID of the catalog entry linked to the user blueprint.
catalog_name str The name of the user blueprint.
creator str The name of the user that created the user blueprint.
user_blueprint_id str The ID of the user blueprint.
description Optional[str] (Default=None) The description of the user blueprint.
last_modifier_name Optional[str] (Default=None) The name of the user that last modified the user blueprint.

search_catalog()

classmethod search_catalog()

Fetch a list of the user blueprint catalog entries the current user has access to based on an optional search term, tags, owner user info, or sort order.

Parameters

Parameter Type Description
search string, Optional. A value to search for in the dataset’s name, description, tags, column names, categories, and latest error. The search is case insensitive. If no value is provided for this parameter, or if the empty string is used, or if the string contains only whitespace, no filtering will be done. Partial matching is performed on dataset name and description fields while all other fields will only match if the search matches the whole value exactly.
tag string, Optional. If provided, the results will be filtered to include only items with the specified tag.
limit int, Optional. (default: 0), at most this many results are returned. To specify no limit, use 0. The default may change and a maximum limit may be imposed without notice.
offset (int, Optional. (default: 0), this many results will be skipped.)
owner_user_id string, Optional. Filter results to those owned by one or more owner identified by UID.
owner_username string, Optional. Filter results to those owned by one or more owner identified by username.
order_by string, Optional. Defaults to `'-created'``` Sort order which will be applied to catalog list, valid options are “catalogName”, “originalName”, “description”, “created”, and “relevance”. For all options other than relevance, you may prefix the attribute name with a dash to sort in descending order. e.g., orderBy=’-catalogName’.

Return type: List[UserBlueprintCatalogSearch]

Custom tasks

CustomTask

class datarobot.CustomTask

A custom task. This can be in a partial state or a complete state. When the latest_version is None, the empty task has been initialized with some metadata. It is not yet use-able for actual training. Once the first CustomTaskVersion has been created, you can put the CustomTask in UserBlueprints to train Models in Projects

Added in version v2.26.

Variables

Attribute Type Description
id str id of the custom task
name str name of the custom task
language str programming language of the custom task. Can be “python”, “r”, “java” or “other”
description str description of the custom task
target_type datarobot.enums.CUSTOM_TASK_TARGET_TYPE the target type of the custom task. One of:- datarobot.enums.CUSTOM_TASK_TARGET_TYPE.BINARY - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.REGRESSION - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.MULTICLASS - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.ANOMALY - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.TRANSFORM
latest_version datarobot.CustomTaskVersion or None latest version of the custom task if the task has a latest version. If the latest version is None, the custom task is not ready for use in user blueprints. You must create its first CustomTaskVersion before you can use the CustomTask
created_by str The username of the user who created the custom task.
updated_at str An ISO-8601 formatted timestamp of when the custom task was updated.
created_at str ISO-8601 formatted timestamp of when the custom task was created
calibrate_predictions bool whether anomaly predictions should be calibrated to be between 0 and 1 by DR. only applies to custom estimators with target type datarobot.enums.CUSTOM_TASK_TARGET_TYPE.ANOMALY

from_server_data()

classmethod from_server_data()

Instantiate an object of this class using the data directly from the server, meaning that the keys may have the wrong camel casing

Parameters

Parameter Type Description
data dict The directly translated dict of JSON from the server. No casing fixes have taken place
keep_attrs iterable List, set or tuple of the dotted namespace notations for attributes to keep within the object structure even if their values are None

Return type: CustomTask

list()

classmethod list()

List custom tasks available to the user.

Added in version v2.26.

Parameters

Parameter Type Description
search_for Optional[str] string for filtering custom tasks - only tasks that contain the string in name or description will be returned. If not specified, all custom task will be returned
order_by Optional[str] property to sort custom tasks by. Supported properties are “created” and “updated”. Prefix the attribute name with a dash to sort in descending order, e.g., order_by=’-created’. By default, the order_by parameter is None which will result in custom tasks being returned in order of creation time descending

Returns

Returns Description
a list of custom tasks.

Return type: List[CustomTask]

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

get()

classmethod get()

Get custom task by id.

Added in version v2.26.

Parameters

Parameter Type Description
custom_task_id str id of the custom task

Returns

Returns Description
retrieved custom task

Return type: CustomTask

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status.
datarobot.errors.ServerError if the server responded with 5xx status.

copy()

classmethod copy()

Create a custom task by copying existing one.

Added in version v2.26.

Parameters

Parameter Type Description
custom_task_id str id of the custom task to copy

Return type: CustomTask

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

create()

classmethod create()

Creates only the metadata for a custom task. This task will not be use-able until you have created a CustomTaskVersion attached to this task.

Added in version v2.26.

Parameters

Parameter Type Description
name str name of the custom task
target_type datarobot.enums.CUSTOM_TASK_TARGET_TYPE the target typed based on the following values. Anything else will raise an error - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.BINARY - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.REGRESSION - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.MULTICLASS - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.ANOMALY - datarobot.enums.CUSTOM_TASK_TARGET_TYPE.TRANSFORM
language Optional[str] programming language of the custom task. Can be “python”, “r”, “java” or “other”
description Optional[str] description of the custom task
calibrate_predictions Optional[bool] whether anomaly predictions should be calibrated to be between 0 and 1 by DR. if None, uses default value from DR app (True). only applies to custom estimators with target type datarobot.enums.CUSTOM_TASK_TARGET_TYPE.ANOMALY

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status.
datarobot.errors.ServerError if the server responded with 5xx status.

Return type: CustomTask

update()

method update()

Update custom task properties.

Added in version v2.26.

Parameters

Parameter Type Description
name Optional[str] new custom task name
language Optional[str] new custom task programming language
description Optional[str] new custom task description

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status.
datarobot.errors.ServerError if the server responded with 5xx status.

Return type: None

refresh()

method refresh()

Update custom task with the latest data from server.

Added in version v2.26.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: None

delete()

method delete()

Delete custom task.

Added in version v2.26.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: None

download_latest_version()

method download_latest_version()

Download the latest custom task version.

Added in version v2.26.

Parameters

Parameter Type Description
file_path str the full path of the target zip file

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status.
datarobot.errors.ServerError if the server responded with 5xx status.

Return type: None

get_access_list()

method get_access_list()

Retrieve access control settings of this custom task.

Added in version v2.27.

Return type: list of SharingAccess

share()

method share()

Update the access control settings of this custom task.

Added in version v2.27.

Parameters

Parameter Type Description
access_list list of SharingAccess A list of SharingAccess to update.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: None

Examples

Transfer access to the custom task from old_user@datarobot.com to new_user@datarobot.com

import datarobot as dr

new_access = dr.SharingAccess(new_user@datarobot.com,
                              dr.enums.SHARING_ROLE.OWNER, can_share=True)
access_list = [dr.SharingAccess(old_user@datarobot.com, None), new_access]

dr.CustomTask.get('custom-task-id').share(access_list)

CustomTaskFileItem

class datarobot.models.custom_task_version.CustomTaskFileItem

A file item attached to a DataRobot custom task version.

Added in version v2.26.

Variables

Attribute Type Description
id str ID of the file item
file_name str Name of the file item
file_path str Path of the file item
file_source str Source of the file item
created_at str ISO-8601 formatted timestamp of when the version was created

CustomTaskOutboundNetworkPolicy

class datarobot.enums.CustomTaskOutboundNetworkPolicy

The way to set and view a CustomTaskVersions outbound network policy.

CustomTaskVersion

class datarobot.CustomTaskVersion

A version of a DataRobot custom task.

Added in version v2.26.

Variables

Attribute Type Description
id str ID of the custom task version
custom_task_id str ID of the custom task
version_minor int A minor version number of custom task version
version_major int A major version number of custom task version
label str Short human readable string to label the version
created_at str ISO-8601 formatted timestamp of when the version was created
is_frozen bool A flag if the custom task version is frozen
items List[CustomTaskFileItem] A list of file items attached to the custom task version
description Optional[str] Custom task version description
base_environment_id Optional[str] ID of the environment to use with the task
base_environment_version_id Optional[str] ID of the environment version to use with the task
dependencies List[CustomDependency] The parsed dependencies of the custom task version if the version has a valid requirements.txt file
required_metadata_values List[RequiredMetadataValue] Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment’s requiredMetadataKeys.
arguments List[UserBlueprintTaskArgument] A list of custom task version arguments.
outbound_network_policy (CustomTaskOutboundNetworkPolicy)

from_server_data()

classmethod from_server_data()

Instantiate an object of this class using the data directly from the server, meaning that the keys may have the wrong camel casing

Parameters

Parameter Type Description
data dict The directly translated dict of JSON from the server. No casing fixes have taken place
keep_attrs iterable List, set or tuple of the dotted namespace notations for attributes to keep within the object structure even if their values are None

Return type: CustomTaskVersion

create_clean()

classmethod create_clean()

Create a custom task version without files from previous versions.

Added in version v2.26.

Parameters

Parameter Type Description
custom_task_id str the ID of the custom task
base_environment_id str the ID of the base environment to use with the custom task version
maximum_memory Optional[int] A number in bytes about how much memory custom tasks’ inference containers can run with.
is_major_update bool If the current version is 2.3, True would set the new version at 3.0. False would set the new version at 2.4. Defaults to True.
folder_path Optional[str] The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
required_metadata_values Optional[List[RequiredMetadataValue]] Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment’s requiredMetadataKeys.
outbound_network_policy Optional[CustomTaskOutboundNetworkPolicy] You must enable custom task network access permissions to pass any value other than None! Specifies if you custom task version is able to make network calls. None will set the value to DataRobot’s default.

Returns

Returns Description
created custom task version

Return type: CustomTaskVersion

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

create_from_previous()

classmethod create_from_previous()

Create a custom task version containing files from a previous version.

Added in version v2.26.

Parameters

Parameter Type Description
custom_task_id str The ID of the custom task
base_environment_id str The ID of the base environment to use with the custom task version
maximum_memory Optional[int] A number in bytes about how much memory custom tasks’ inference containers can run with.
is_major_update bool If the current version is 2.3, True would set the new version at 3.0. False would set the new version at 2.4. Defaults to True.
folder_path Optional[str] The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
files_to_delete Optional[List[str]] the list of a file items ids to be deleted Example: [“5ea95f7a4024030aba48e4f9”, “5ea6b5da402403181895cc51”]
required_metadata_values Optional[List[RequiredMetadataValue]] Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment’s requiredMetadataKeys.
outbound_network_policy Optional[CustomTaskOutboundNetworkPolicy] You must enable custom task network access permissions to pass any value other than None! Specifies if you custom task version is able to make network calls. None will get the value from the previous version if you have the proper permissions or use DataRobot’s default.

Returns

Returns Description
created custom task version

Return type: CustomTaskVersion

Raises

Exception Description
datarobot.errors.ClientError If the server responded with 4xx status
datarobot.errors.ServerError If the server responded with 5xx status

list()

classmethod list()

List custom task versions.

Added in version v2.26.

Parameters

Parameter Type Description
custom_task_id str The ID of the custom task

Returns

Returns Description
A list of custom task versions

Return type: List[CustomTaskVersion]

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

get()

classmethod get()

Get custom task version by id.

Added in version v2.26.

Parameters

Parameter Type Description
custom_task_id str The ID of the custom task
custom_task_version_id str The ID of the custom task version to retrieve

Returns

Returns Description
Retrieved custom task version

Return type: CustomTaskVersion

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status.
datarobot.errors.ServerError if the server responded with 5xx status.

download()

method download()

Download custom task version.

Added in version v2.26.

Parameters

Parameter Type Description
file_path str Path to create a file with custom task version content

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status.
datarobot.errors.ServerError if the server responded with 5xx status.

Return type: None

update()

method update()

Update custom task version properties.

Added in version v2.26.

Parameters

Parameter Type Description
description str new custom task version description
required_metadata_values List[RequiredMetadataValue] Additional parameters required by the execution environment. The required keys are defined by the fieldNames in the base environment’s requiredMetadataKeys.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status.
datarobot.errors.ServerError if the server responded with 5xx status.

Return type: None

refresh()

method refresh()

Update custom task version with the latest data from server.

Added in version v2.26.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: None

start_dependency_build()

method start_dependency_build()

Start the dependency build for a custom task version and return build status. .. versionadded:: v2.27

Returns

Returns Description
DTO of custom task version dependency build.

Return type: CustomTaskVersionDependencyBuild

start_dependency_build_and_wait()

method start_dependency_build_and_wait()

Start the dependency build for a custom task version and wait while pulling status. .. versionadded:: v2.27

Parameters

Parameter Type Description
max_wait int max time to wait for a build completion

Returns

Returns Description
DTO of custom task version dependency build.

Return type: CustomTaskVersionDependencyBuild

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status
datarobot.errors.AsyncTimeoutError Raised if the dependency build is not finished after max_wait.

cancel_dependency_build()

method cancel_dependency_build()

Cancel custom task version dependency build that is in progress. .. versionadded:: v2.27

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: None

get_dependency_build()

method get_dependency_build()

Retrieve information about a custom task version’s dependency build. .. versionadded:: v2.27

Returns

Returns Description
DTO of custom task version dependency build.

Return type: CustomTaskVersionDependencyBuild

download_dependency_build_log()

method download_dependency_build_log()

Get log of a custom task version dependency build. .. versionadded:: v2.27

Parameters

Parameter Type Description
file_directory str (optional, default is "."``) Directory path where downloaded file is to save.

Raises

Exception Description
datarobot.errors.ClientError if the server responded with 4xx status
datarobot.errors.ServerError if the server responded with 5xx status

Return type: None

Visual AI

Image

class datarobot.models.visualai.images.Image

An image stored in a project’s dataset.

Variables

Attribute Type Description
id str Image ID for this image.
image_type str Image media type. Accessing this may require a server request and an associated delay in returning.
image_bytes bytes Raw bytes of this image. Accessing this may require a server request and an associated delay in returning.
height int Height of the image in pixels.
width int Width of the image in pixels.

get()

classmethod get()

Get a single image object from project.

Parameters

Parameter Type Description
project_id str Id of the project that contains the images.
image_id str ID of image to load from the project.

Return type: Image

SampleImage

class datarobot.models.visualai.images.SampleImage

A sample image in a project’s dataset.

If Project.stage is datarobot.enums.PROJECT_STAGE.EDA2 then the target_* attributes of this class will have values, otherwise the values will all be None.

Variables

Attribute Type Description
image Image Image object.
target_value TargetValue Value associated with the feature_name.
project_id str Id of the project that contains the images.

list()

classmethod list()

Get sample images from a project.

Parameters

Parameter Type Description
project_id str Project that contains the images.
feature_name str Name of feature column that contains images.
target_value TargetValue For classification projects - target value to filter images. Please note that you can only use this parameter when the project has finished the EDA2 stage.
target_bin_start Optional[Union[int, float]] For regression projects - only images corresponding to the target values above (inclusive) this value will be returned. Must be specified together with target_bin_end. Please note that you can only use this parameter when the project has finished the EDA2 stage.
target_bin_end Optional[Union[int, float]] For regression projects - only images corresponding to the target values below (exclusive) this value will be returned. Must be specified together with target_bin_start. Please note that you can only use this parameter when the project has finished the EDA2 stage.
offset Optional[int] Number of images to be skipped.
limit Optional[int] Number of images to be returned.

Return type: List[SampleImage]

DuplicateImage

class datarobot.models.visualai.images.DuplicateImage

An image that was duplicated in the project dataset.

Variables

Attribute Type Description
image Image Image object.
count int Number of times the image was duplicated.

list()

classmethod list()

Get all duplicate images in a project.

Parameters

Parameter Type Description
project_id str Project that contains the images.
feature_name str Name of feature column that contains images.
offset Optional[int] Number of images to be skipped.
limit Optional[int] Number of images to be returned.

Return type: List[DuplicateImage]

ImageEmbedding

class datarobot.models.visualai.insights.ImageEmbedding

Vector representation of an image in an embedding space.

A vector in an embedding space will allow linear computations to be carried out between images: for example computing the Euclidean distance of the images.

Variables

Attribute Type Description
image Image Image object used to create this map.
feature_name str Name of the feature column this embedding is associated with.
position_x int X coordinate of the image in the embedding space.
position_y int Y coordinate of the image in the embedding space.
actual_target_value object Actual target value of the dataset row.
target_values Optional[List[str]] For classification projects, a list of target values of this project.
target_bins Optional[List[Dict[str, float]]] For regression projects, a list of target bins of this project.
project_id str Id of the project this Image Embedding belongs to.
model_id str Id of the model this Image Embedding belongs to.

compute()

classmethod compute()

Start the computation of image embeddings for the model.

Parameters

Parameter Type Description
project_id str Project to start creation in.
model_id str Project’s model to start creation in.

Returns

Returns Description
URL to check for image embeddings progress.

Return type: str

Raises

Exception Description
datarobot.errors.ClientError Server rejected creation due to client error. Most likely cause is bad project_id or model_id.

models()

classmethod models()

For a given project_id, list all model_id - feature_name pairs with available Image Embeddings.

Parameters

Parameter Type Description
project_id str Id of the project to list model_id - feature_name pairs with available Image Embeddings for.

Returns

Returns Description
List of model and feature name pairs.

Return type: list( tuple(model_id, feature_name) )

list()

classmethod list()

Return a list of ImageEmbedding objects.

Parameters

Parameter Type Description
project_id str Id of the project the model belongs to.
model_id str Id of the model to list Image Embeddings for.
feature_name str Name of feature column to list Image Embeddings for.

Return type: List[ImageEmbedding]

ImageActivationMap

class datarobot.models.visualai.insights.ImageActivationMap

Mark areas of image with weight of impact on training.

This is a technique to display how various areas of the region were used in training, and their effect on predictions. Larger values in activation_values indicates a larger impact.

Variables

Attribute Type Description
image Image Image object used to create this map.
overlay_image Image Image object containing the original image overlaid by the activation heatmap.
feature_name str Name of the feature column that contains the value this map is based on.
activation_values List[List[int]] A row-column matrix that contains the activation strengths for image regions. Values are integers in the range [0, 255].
actual_target_value TargetValue Actual target value of the dataset row.
predicted_target_value TargetValue Predicted target value of the dataset row that contains this image.
target_values Optional[List[str]] For classification projects a list of target values of this project.
target_bins Optional[List[Dict[str, float]]] For regression projects a list of target bins.
project_id str Id of the project this Activation Map belongs to.
model_id str Id of the model this Activation Map belongs to.

compute()

classmethod compute()

Start the computation of activation maps for the given model.

Parameters

Parameter Type Description
project_id str Project to start creation in.
model_id str Project’s model to start creation in.

Returns

Returns Description
URL to check for image embeddings progress.

Return type: str

Raises

Exception Description
datarobot.errors.ClientError Server rejected creation due to client error. Most likely cause is bad project_id or model_id.

models()

classmethod models()

For a given project_id, list all model_id - feature_name pairs with available Image Activation Maps.

Parameters

Parameter Type Description
project_id str Id of the project to list model_id - feature_name pairs with available Image Activation Maps for.

Returns

Returns Description
List of model and feature name pairs.

Return type: list( tuple(model_id, feature_name) )

list()

classmethod list()

Return a list of ImageActivationMap objects.

Parameters

Parameter Type Description
project_id str Project that contains the images.
model_id str Model that contains the images.
feature_name str Name of feature column that contains images.
offset Optional[int] Number of images to be skipped.
limit Optional[int] Number of images to be returned.

Return type: List[ImageActivationMap]

ImageAugmentationOptions

class datarobot.models.visualai.augmentation.ImageAugmentationOptions

A List of all supported Image Augmentation Transformations for a project. Includes additional information about minimum, maximum, and default values for a transformation.

Variables

Attribute Type Description
name str The name of the augmentation list
project_id str The project containing the image data to be augmented
min_transformation_probability float The minimum allowed value for transformation probability.
current_transformation_probability float Default setting for probability that each transformation will be applied to an image.
max_transformation_probability float The maximum allowed value for transformation probability.
min_number_of_new_images int The minimum allowed number of new rows to add for each existing row
current_number_of_new_images int The default number of new rows to add for each existing row
max_number_of_new_images int The maximum allowed number of new rows to add for each existing row
transformations list[dict] List of transformations to possibly apply to each image

get()

classmethod get()

Returns a list of all supported transformations for the given project

Parameters

Parameter Type Description
project_id str sting The id of the project for which to return the list of supported transformations.

Return type: ImageAugmentationOptions

Returns

Returns Description
ImageAugmentationOptions
: A list containing all the supported transformations for the project.

ImageAugmentationList

class datarobot.models.visualai.augmentation.ImageAugmentationList

A List of Image Augmentation Transformations

Variables

Attribute Type Description
name str The name of the augmentation list
project_id str The project containing the image data to be augmented
feature_name Optional[str] name of the feature that the augmentation list is associated with
in_use bool Whether this is the list that will passed in to every blueprint during blueprint generation before autopilot
initial_list bool True if this is the list to be used during training to produce augmentations
transformation_probability float Probability that each transformation will be applied to an image. Value should be between 0.01 - 1.0.
number_of_new_images int Number of new rows to add for each existing row
transformations List[Dict] List of transformations to possibly apply to each image
samples_id str Id of last image augmentation sample generated for image augmentation list.

create()

classmethod create()

create a new image augmentation list

Return type: ImageAugmentationList

list()

classmethod list()

List Image Augmentation Lists present in a project.

Parameters

Parameter Type Description
project_id str Project Id to retrieve augmentation lists for.
feature_name Optional[str] If passed, the response will only include Image Augmentation Lists active for the provided feature name.

Return type: list[ImageAugmentationList]

update()

method update()

Update one or multiple attributes of the Image Augmentation List in the DataRobot backend as well on this object.

Parameters

Parameter Type Description
name Optional[str] New name of the feature list.
feature_name Optional[str] The new feature name for which the Image Augmentation List is effective.
initial_list Optional[bool] New flag that indicates whether this list will be used during Autopilot to perform image augmentation.
transformation_probability Optional[float] New probability that each enabled transformation will be applied to an image. This does not apply to Horizontal or Vertical Flip, which are always set to 50%.
number_of_new_images Optional[int] New number of new rows to add for each existing row, updating the existing augmentation list.
transformations Optional[list] New list of Transformations to possibly apply to each image.

Returns

Returns Description
Reference to self. The passed values will be updated in place.

Return type: ImageAugmentationList

retrieve_samples()

method retrieve_samples()

Lists already computed image augmentation sample for image augmentation list. Returns samples only if they have been already computed. It does not initialize computation.

Return type: List of class ImageAugmentationSample

compute_samples()

method compute_samples()

Initializes computation and retrieves list of image augmentation samples for image augmentation list. If samples exited prior to this call method, this will compute fresh samples and return latest version of samples.

Return type: List of class ImageAugmentationSample

ImageAugmentationSample

class datarobot.models.visualai.augmentation.ImageAugmentationSample

A preview of the type of images that augmentations will create during training.

Variables

Attribute Type Description
sample_id ObjectId The id of the augmentation sample, used to group related images together
image_id ObjectId A reference to the Image which can be used to retrieve the image binary
project_id ObjectId A reference to the project containing the image
original_image_id ObjectId A reference to the original image that generated this image in the case of an augmented image. If this is None it signifies this is an original image
height int Image height in pixels
width int Image width in pixels

list()

classmethod list()

Return a list of ImageAugmentationSample objects.

Parameters

Parameter Type Description
auglist_id str ID for augmentation list to retrieve samples for

Return type: List of class ImageAugmentationSample