Skip to content

Challenger

Challenger

class datarobot.models.deployment.challenger.Challenger

A challenger is an alternative model being compared to the model currently deployed

Variables

Attribute Type Description
id str The ID of the challenger.
deployment_id str The ID of the deployment.
name str The name of the challenger.
model dict The model of the challenger.
model_package dict The model package of the challenger.
prediction_environment dict The prediction environment of the challenger.

create()

classmethod create()

Create a challenger for a deployment

Parameters

Parameter Type Description
deployment_id str The ID of the deployment
model_package_id str The model package id of the challenger model
prediction_environment_id str The prediction environment id of the challenger model
name str The name of the challenger model
max_wait Optional[int] The amount of seconds to wait for successful resolution of a challenger creation job.

Return type: Challenger

Examples

from datarobot import Challenger
challenger = Challenger.create(
    deployment_id="5c939e08962d741e34f609f0",
    name="Elastic-Net Classifier",
    model_package_id="5c0a969859b00004ba52e41b",
    prediction_environment_id="60b012436635fc00909df555"
)

get()

classmethod get()

Get a challenger for a deployment

Parameters

Parameter Type Description
deployment_id str The ID of the deployment
challenger_id str The ID of the challenger

Returns

Returns Description
The challenger object

Return type: Challenger

Examples

from datarobot import Challenger
challenger = Challenger.get(
    deployment_id="5c939e08962d741e34f609f0",
    challenger_id="5c939e08962d741e34f609f0"
)

challenger.id
>>>'5c939e08962d741e34f609f0'
challenger.model_package['name']
>>> 'Elastic-Net Classifier'

list()

classmethod list()

List all challengers for a deployment

Parameters

Parameter Type Description
deployment_id str The ID of the deployment

Returns

Returns Description
challengers A list of challenger objects

Return type: list

Examples

from datarobot import Challenger
challengers = Challenger.list(deployment_id="5c939e08962d741e34f609f0")

challengers[0].id
>>>'5c939e08962d741e34f609f0'
challengers[0].model_package['name']
>>> 'Elastic-Net Classifier'

delete()

method delete()

Delete a challenger for a deployment

Return type: None

update()

method update()

Update name and prediction environment of a challenger

Parameters

Parameter Type Description
name Optional[str] The name of the challenger model
prediction_environment_id Optional[str] The prediction environment id of the challenger model

Return type: None

ChampionModelPackage

class datarobot.models.deployment.champion_model_package.ChampionModelPackage

Represents a champion model package.

Parameters

Parameter Type Description
id str The ID of the registered model version.
registered_model_id str The ID of the parent registered model.
registered_model_version int The version of the registered model.
name str The name of the registered model version.
model_id str The ID of the model.
model_execution_type str The type of model package (version). dedicated (native DataRobot models) and custom_inference_model` (user added inference models) both execute on DataRobot prediction servers, while external does not.
is_archived bool Whether the model package (version) is permanently archived (cannot be used in deployment or replacement).
import_meta ImportMeta Information from when this model package (version) was first saved.
source_meta SourceMeta Meta information from where the model was generated.
model_kind ModelKind Model attribute information.
target Target Target information for the registered model version.
model_description ModelDescription Model description information.
datasets Dataset Dataset information for the registered model version.
timeseries Timeseries Time series information for the registered model version.
bias_and_fairness BiasAndFairness Bias and fairness information for the registered model version.
is_deprecated bool Whether the model package (version) is deprecated (cannot be used in deployment or replacement).
build_status str or None Model package (version) build status. One of complete, inProgress, failed.
user_provided_id str or None User provided ID for the registered model version.
updated_at str or None The time the registered model version was last updated.
updated_by UserMetadata or None The user who last updated the registered model version.
tags List[TagWithId] or None The tags associated with the registered model version.
mlpkg_file_contents str or None The contents of the model package file.