pdstools.infinity.resources.prediction_studio.v24_2 =================================================== .. py:module:: pdstools.infinity.resources.prediction_studio.v24_2 Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/pdstools/infinity/resources/prediction_studio/v24_2/champion_challenger/index /autoapi/pdstools/infinity/resources/prediction_studio/v24_2/datamart_export/index /autoapi/pdstools/infinity/resources/prediction_studio/v24_2/model/index /autoapi/pdstools/infinity/resources/prediction_studio/v24_2/model_upload/index /autoapi/pdstools/infinity/resources/prediction_studio/v24_2/prediction/index /autoapi/pdstools/infinity/resources/prediction_studio/v24_2/prediction_studio/index /autoapi/pdstools/infinity/resources/prediction_studio/v24_2/repository/index Classes ------- .. autoapisummary:: pdstools.infinity.resources.prediction_studio.v24_2.AsyncPredictionStudio pdstools.infinity.resources.prediction_studio.v24_2.PredictionStudio pdstools.infinity.resources.prediction_studio.v24_2.Repository Package Contents ---------------- .. py:class:: AsyncPredictionStudio(client: pdstools.infinity.client.AsyncAPIClient) Bases: :py:obj:`pdstools.infinity.resources.prediction_studio.v24_1.AsyncPredictionStudio` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: version :type: str :value: '24.2' .. py:class:: PredictionStudio(client: pdstools.infinity.client.SyncAPIClient) Bases: :py:obj:`pdstools.infinity.resources.prediction_studio.v24_1.PredictionStudio` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: version :type: str :value: '24.2' .. py:method:: 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. :rtype: Repository .. py:method:: 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. :param return_df: Set to True to get the results as a DataFrame. By default, it's False, and you get a PaginatedList. :type return_df: bool, optional :returns: Returns a list of models or a DataFrame with model information, based on the `return_df` parameter. :rtype: PaginatedList[Model] or polars.DataFrame .. py:method:: 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. :param return_df: Set to True to get the results as a DataFrame. By default, it's False, and you get a list. :type return_df: bool, optional :returns: Returns a list of models or a DataFrame with model information, based on the `as_df` parameter. :rtype: PaginatedList[Model] or polar.DataFrame .. py:method:: get_prediction(prediction_id: Optional[str] = None, label: Optional[str] = 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. :param id: The unique ID of the prediction you're looking for. By default, it's None. :type id: str, optional :param label: The label of the prediction you're interested in. Also None by default. :type label: str, optional :param \*\*kwargs: Other details you can specify to help find the prediction. :type \*\*kwargs: dict, optional :returns: The prediction that matches your search criteria. :rtype: Prediction :raises ValueError: If you don't provide an ID or label, it will tell you that you need at least one of them. .. py:method:: get_model(model_id: Optional[str] = None, label: Optional[str] = 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. :param id: The unique ID of the model you want to find. :type id: str, optional :param label: The label of the model you're interested in. :type label: str, optional :param \*\*kwargs: Other details you can specify to help find the model. :type \*\*kwargs: dict, optional :returns: The model that matches your search. :rtype: Model :raises ValueError: If you don't provide an ID or label, it will tell you that you need at least one of them. .. py:method:: 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. :rtype: DataMartExport .. py:method:: 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. :param model: The model to be uploaded. This can be specified either as a file path (str) to the model file or as an ONNX model object. :type model: str or ONNX model object :param file_name: The name of the file (including extension) to be uploaded to the repository. :type file_name: str :returns: Details about the uploaded model, including API response data. :rtype: UploadedModel :raises ValueError: Raised if an attempt is made to upload an ONNX model without the required conversion library. :raises ModelValidationError: If the model validation fails. .. py:method:: 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. :returns: Each dictionary in the list has details about a model category, like its name and other useful information. :rtype: list of dict .. py:method:: get_notifications(category: Optional[pdstools.infinity.resources.prediction_studio.types.NotificationCategory] = None, return_df: Literal[False] = False) -> pdstools.infinity.internal._pagination.PaginatedList[pdstools.infinity.resources.prediction_studio.base.Notification] get_notifications(category: Optional[pdstools.infinity.resources.prediction_studio.types.NotificationCategory] = 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. :param category: The category of notifications to retrieve. If not specified, all notifications are fetched. :type category: {"All", "Responses", "Performance", "Model approval", "Output", "Predictors", "Prediction deployment", "Generic"} or None, optional :param return_df: If True, returns the notifications as a DataFrame. Otherwise, returns a list. :type return_df: bool, default False :returns: A list of notifications or a DataFrame containing the notifications, depending on the value of `return_df`. :rtype: PaginatedList[Notification] or polars.DataFrame .. py:class:: Repository(client, type, repository_name, bucket_name, root_path, datamart_export_location) Bases: :py:obj:`pdstools.infinity.resources.prediction_studio.v24_1.Repository` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: type .. py:attribute:: bucket_name .. py:attribute:: root_path .. py:attribute:: datamart_export_location .. py:property:: s3_url