User blueprints

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:
  • 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

classmethod list(limit=100, offset=0, project_id=None)

Fetch a list of the user blueprints the current user created

Parameters:
  • 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:
Return type:

list[UserBlueprint]

classmethod get(user_blueprint_id, project_id=None)

Retrieve a user blueprint

Parameters:
  • 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:
Return type:

UserBlueprint

classmethod create(blueprint, model_type=None, project_id=None, save_to_catalog=True)

Create a user blueprint

Parameters:
  • 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:
Return type:

UserBlueprint

classmethod create_from_custom_task_version_id(custom_task_version_id, save_to_catalog=True, description=None)

Create a user blueprint with a single custom task version

Parameters:
  • 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:
Return type:

UserBlueprint

classmethod clone_project_blueprint(blueprint_id, project_id, model_type=None, save_to_catalog=True)

Clone a blueprint from a project.

Parameters:
  • 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:
Return type:

UserBlueprint

classmethod clone_user_blueprint(user_blueprint_id, model_type=None, project_id=None, save_to_catalog=True)

Clone a user blueprint.

Parameters:
  • 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:
Return type:

UserBlueprint

classmethod update(blueprint, user_blueprint_id, model_type=None, project_id=None, include_project_id_if_none=False)

Update a user blueprint

Parameters:
  • 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:
Return type:

UserBlueprint

classmethod delete(user_blueprint_id)

Delete a user blueprint, specified by the userBlueprintId.

Parameters:

user_blueprint_id (string) – Used to identify a specific user-owned blueprint.

Raises:
Return type:

requests.models.Response

classmethod get_input_types()

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

Raises:
Return type:

UserBlueprintAvailableInput

classmethod add_to_project(project_id, user_blueprint_ids)

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

Parameters:
  • 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:
Return type:

UserBlueprintAddToProjectMenu

classmethod get_available_tasks(project_id=None, user_blueprint_id=None)

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

Parameters:
  • project_id (string, Optional)

  • user_blueprint_id (string, Optional)

Raises:
Return type:

UserBlueprintAvailableTasks

classmethod validate_task_parameters(output_method, task_code, task_parameters, project_id=None)

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

Parameters:
  • 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:
Return type:

UserBlueprintValidateTaskParameters

classmethod list_shared_roles(user_blueprint_id, limit=100, offset=0, id=None, name=None, share_recipient_type=None)

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

Parameters:
  • 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:
Return type:

list[UserBlueprintSharedRolesResponseValidator]

classmethod validate_blueprint(blueprint, project_id=None)

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

Parameters:
  • 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:
Return type:

list[VertexContextItem]

classmethod update_shared_roles(user_blueprint_id, roles)

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

Parameters:
  • 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:
Return type:

requests.models.Response

classmethod search_catalog(search=None, tag=None, limit=100, offset=0, owner_user_id=None, owner_username=None, order_by='-created')

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:
  • 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

class datarobot.models.user_blueprints.models.UserBlueprintAvailableInput

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

Parameters:

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

classmethod get_input_types()

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

Raises:
Return type:

UserBlueprintAvailableInput

class datarobot.models.user_blueprints.models.UserBlueprintAddToProjectMenu

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

Parameters:
  • 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.

classmethod add_to_project(project_id, user_blueprint_ids)

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

Parameters:
  • 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:
Return type:

UserBlueprintAddToProjectMenu

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:
  • 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.

classmethod get_available_tasks(project_id=None, user_blueprint_id=None)

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

Parameters:
  • project_id (string, Optional)

  • user_blueprint_id (string, Optional)

Raises:
Return type:

UserBlueprintAvailableTasks

class datarobot.models.user_blueprints.models.UserBlueprintValidateTaskParameters

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

Parameters:

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

classmethod validate_task_parameters(output_method, task_code, task_parameters, project_id=None)

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

Parameters:
  • 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:
Return type:

UserBlueprintValidateTaskParameters

class datarobot.models.user_blueprints.models.UserBlueprintSharedRolesResponseValidator

A list of SharedRoles objects.

Parameters:
  • 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.

class datarobot.models.user_blueprints.models.VertexContextItem

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

Parameters:
  • task_id (string) – The id associated with a specific vertex in the blueprint.

  • information (VertexContextItemInfo)

  • messages (VertexContextItemMessages)

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:
  • 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.

classmethod search_catalog(search=None, tag=None, limit=100, offset=0, owner_user_id=None, owner_username=None, order_by='-created')

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:
  • 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]