# Challenger models
URL: https://docs.datarobot.com/en/docs/api/reference/sdk/challenger-models.html

# Challenger

### class datarobot.models.deployment.challenger.Challenger

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

- Variables:

#### classmethod create(deployment_id, model_package_id, prediction_environment_id, name, max_wait=600)

Create a challenger for a deployment

- Parameters:
- Return type: Challenger

> [!NOTE] 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:
- Returns: The challenger object
- Return type: Challenger

> [!NOTE] 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

> [!NOTE] 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:
- Return type: None

### class datarobot.models.deployment.champion_model_package.ChampionModelPackage

Represents a champion model package.

- Parameters:

---
