pdstools.infinity.resources.prediction_studio.v24_2¶
Submodules¶
- pdstools.infinity.resources.prediction_studio.v24_2.champion_challenger
- pdstools.infinity.resources.prediction_studio.v24_2.datamart_export
- pdstools.infinity.resources.prediction_studio.v24_2.model
- pdstools.infinity.resources.prediction_studio.v24_2.model_upload
- pdstools.infinity.resources.prediction_studio.v24_2.prediction
- pdstools.infinity.resources.prediction_studio.v24_2.prediction_studio
- pdstools.infinity.resources.prediction_studio.v24_2.repository
Classes¶
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
Package Contents¶
- class AsyncPredictionStudio(client: pdstools.infinity.client.AsyncAPIClient)¶
Bases:
pdstools.infinity.resources.prediction_studio.v24_1.AsyncPredictionStudio
Helper class that provides a standard way to create an ABC using inheritance.
- Parameters:
client (pdstools.infinity.client.AsyncAPIClient)
- class PredictionStudio(client: pdstools.infinity.client.SyncAPIClient)¶
Bases:
pdstools.infinity.resources.prediction_studio.v24_1.PredictionStudio
Helper class that provides a standard way to create an ABC using inheritance.
- Parameters:
client (pdstools.infinity.client.SyncAPIClient)
- repository() pdstools.infinity.resources.prediction_studio.v24_2.repository.Repository ¶
Gets information about the repository from Prediction Studio.
- Returns:
A simple object with the repository’s details, ready to use.
- Return type:
- list_models(return_df: Literal[False] = False) pdstools.infinity.internal._pagination.PaginatedList[pdstools.infinity.resources.prediction_studio.v24_2.model.Model] ¶
- list_models(return_df: Literal[True]) polars.DataFrame
Fetches a list of all models from Prediction Studio.
This function gets information about all the models stored in Prediction Studio.
- Parameters:
return_df (bool, optional) – Set to True to get the results as a DataFrame. By default, it’s False, and you get a PaginatedList.
- Returns:
Returns a list of models or a DataFrame with model information, based on the return_df parameter.
- Return type:
PaginatedList[Model] or polars.DataFrame
- list_predictions(return_df: Literal[False] = False) pdstools.infinity.internal._pagination.PaginatedList[pdstools.infinity.resources.prediction_studio.v24_2.prediction.Prediction] ¶
- list_predictions(return_df: Literal[True]) polars.DataFrame
Fetches a list of all predictions from Prediction Studio.
This function gets information about all the predictions stored in Prediction Studio.
- Parameters:
return_df (bool, optional) – Set to True to get the results as a DataFrame. By default, it’s False, and you get a list.
- Returns:
Returns a list of models or a DataFrame with model information, based on the as_df parameter.
- Return type:
PaginatedList[Model] or polar.DataFrame
- get_prediction(prediction_id: str | None = None, label: str | None = None, **kwargs) pdstools.infinity.resources.prediction_studio.v24_2.prediction.Prediction ¶
Finds and returns a specific prediction from Prediction Studio.
This function looks for a prediction using its ID or label. You can also use other details to narrow down the search. It’s useful when you need to get information about one particular prediction.
- Parameters:
id (str, optional) – The unique ID of the prediction you’re looking for. By default, it’s None.
label (str, optional) – The label of the prediction you’re interested in. Also None by default.
**kwargs (dict, optional) – Other details you can specify to help find the prediction.
prediction_id (Optional[str])
- Returns:
The prediction that matches your search criteria.
- Return type:
- Raises:
ValueError – If you don’t provide an ID or label, it will tell you that you need at least one of them.
- get_model(model_id: str | None = None, label: str | None = None, **kwargs) pdstools.infinity.resources.prediction_studio.v24_2.model.Model ¶
Finds and returns a specific model from Prediction Studio.
This function searches for a model using its ID or label. You can also use other details to help find exactly what you’re looking for. It’s handy when you need details about a particular model.
- Parameters:
- Returns:
The model that matches your search.
- Return type:
- Raises:
ValueError – If you don’t provide an ID or label, it will tell you that you need at least one of them.
- trigger_datamart_export() pdstools.infinity.resources.prediction_studio.v24_2.datamart_export.DatamartExport ¶
Initiates an export of model data to the Repository.
This function begins the process of moving model data from Prediction Studio to the Repository.
- Returns:
An object with information about the data export process.
- Return type:
- upload_model(model: pdstools.infinity.resources.prediction_studio.base.LocalModel, file_name: str) pdstools.infinity.resources.prediction_studio.v24_2.model_upload.UploadedModel ¶
Uploads a model to the repository.
This function handles the uploading of a model to the Repository, creating an UploadedModel object for further MLops processes.
- Parameters:
- Returns:
Details about the uploaded model, including API response data.
- Return type:
- Raises:
ValueError – Raised if an attempt is made to upload an ONNX model without the required conversion library.
ModelValidationError – If the model validation fails.
- get_model_categories()¶
Gets a list of model categories from Prediction Studio.
This function gives you back a list where each item tells you about one type of model. Which can be useful for adding a condional model to a prediction.
- get_notifications(category: pdstools.infinity.resources.prediction_studio.types.NotificationCategory | None = None, return_df: Literal[False] = False) pdstools.infinity.internal._pagination.PaginatedList[pdstools.infinity.resources.prediction_studio.base.Notification] ¶
- get_notifications(category: pdstools.infinity.resources.prediction_studio.types.NotificationCategory | None = None, return_df: Literal[True] = True) polars.DataFrame
Fetches a list of notifications from Prediction Studio.
This function retrieves notifications from Prediction Studio. You can filter these notifications by their category. Optionally, the notifications can be returned as a DataFrame for easier analysis and visualization.
- Parameters:
category ({"All", "Responses", "Performance", "Model approval", "Output", "Predictors", "Prediction deployment", "Generic"} or None, optional) – The category of notifications to retrieve. If not specified, all notifications are fetched.
return_df (bool, default False) – If True, returns the notifications as a DataFrame. Otherwise, returns a list.
- Returns:
A list of notifications or a DataFrame containing the notifications, depending on the value of return_df.
- Return type:
PaginatedList[Notification] or polars.DataFrame
- class Repository(client, type, repository_name, bucket_name, root_path, datamart_export_location)¶
Bases:
pdstools.infinity.resources.prediction_studio.v24_1.Repository
Helper class that provides a standard way to create an ABC using inheritance.
- type¶
- bucket_name¶
- root_path¶
- datamart_export_location¶
- property s3_url¶