Challenger¶
class datarobot.models.deployment.challenger.Challenger¶
A challenger is an alternative model being compared to the model currently deployed
- Variables:
- 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.
- id (
classmethod create(deployment_id, model_package_id, prediction_environment_id, name, max_wait=600)¶
Create a challenger for a deployment
- Parameters:
- 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.
- deployment_id (
- 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"
)
classmethod get(deployment_id, challenger_id)¶
Get a challenger for a deployment
- Parameters:
- deployment_id (
str) – The ID of the deployment - challenger_id (
str) – The ID of the challenger
- deployment_id (
- Returns: 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'
classmethod list(deployment_id)¶
List all challengers for a deployment
- Parameters:
deployment_id (
str) – The ID of the deployment - Returns: 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()¶
Delete a challenger for a deployment
- Return type:
None
update(name=None, prediction_environment_id=None)¶
Update name and prediction environment of a challenger
- Parameters:
- name (
Optional[str]) – The name of the challenger model - prediction_environment_id (
Optional[str]) – The prediction environment id of the challenger model
- name (
- Return type:
None
class datarobot.models.deployment.champion_model_package.ChampionModelPackage¶
Represents a champion model package.
- Parameters:
- 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 (
strorNone) – Model package (version) build status. One of complete, inProgress, failed. - user_provided_id (
strorNone) – User provided ID for the registered model version. - updated_at (
strorNone) – The time the registered model version was last updated. - updated_by (
UserMetadataorNone) – The user who last updated the registered model version. - tags (
List[TagWithId]orNone) – The tags associated with the registered model version. - mlpkg_file_contents (
strorNone) – The contents of the model package file.
- id (