pdstools.infinity.resources.prediction_studio.v24_2.champion_challenger._async

Classes

AsyncChampionChallenger

The ChampionChallenger class manages champion and challenger models

Module Contents

class AsyncChampionChallenger(client, prediction_id: str, active_model, cc_id: str | None = None, context: str | None = None, category: str | None = None, challenger_model=None, champion_percentage: float | None = None, model_objective: str | None = None)

Bases: pdstools.infinity.resources.prediction_studio.v24_2.champion_challenger._mixin._ChampionChallengerV24_2Mixin, pdstools.infinity.resources.prediction_studio.base.AsyncChampionChallenger

The ChampionChallenger class manages champion and challenger models within a prediction context. It provides functionalities for:

  • Refreshing champion challenger data

  • Deleting challenger models

  • Promoting challenger models

  • Updating challenger response percentages

  • Adding new models

  • Cloning an ADM active model

  • Adding/removing predictors

Parameters:
  • prediction_id (str)

  • cc_id (str | None)

  • context (str | None)

  • category (str | None)

  • champion_percentage (float | None)

  • model_objective (str | None)

client

The client used to interact with the API.

Type:

Client

prediction_id

The ID of the prediction.

Type:

str

active_model

The active model in the prediction.

Type:

Model

cc_id

The ID of the champion challenger.

Type:

str | None

context

The context of the prediction.

Type:

str | None

category

The category of the prediction.

Type:

str | None

challenger_model

The challenger model.

Type:

Model | None

champion_percentage

The percentage of responses attributed to the champion model.

Type:

float | None

model_objective

The objective of the model.

Type:

str | None

async list_available_models_to_add(return_df: bool = False) pdstools.infinity.internal._pagination.AsyncPaginatedList | polars.DataFrame

Fetches a list of models eligible to be challengers.

Parameters:

return_df (bool, optional) – Determines the format of the returned data: a DataFrame if True, otherwise an async list of model instances. Defaults to False.

Returns:

An async list of model instances or a DataFrame of models.

Return type:

AsyncPaginatedList[AsyncModel] or pl.DataFrame