:py:mod:`abacusai.batch_prediction_version`
===========================================

.. py:module:: abacusai.batch_prediction_version


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   abacusai.batch_prediction_version.BatchPredictionVersion




.. py:class:: BatchPredictionVersion(client, batchPredictionVersion=None, batchPredictionId=None, status=None, driftMonitorStatus=None, deploymentId=None, modelId=None, modelVersion=None, predictionsStartedAt=None, predictionsCompletedAt=None, globalPredictionArgs=None, databaseOutputError=None, totalPredictions=None, failedPredictions=None, databaseConnectorId=None, databaseOutputConfiguration=None, explanations=None, fileConnectorOutputLocation=None, fileOutputFormat=None, connectorType=None, legacyInputLocation=None, error=None, driftMonitorError=None, monitorWarnings=None, csvInputPrefix=None, csvPredictionPrefix=None, csvExplanationsPrefix=None, databaseOutputTotalWrites=None, databaseOutputFailedWrites=None, outputIncludesMetadata=None, resultInputColumns=None, modelMonitorVersion=None, algoName=None, algorithm=None, batchInputs={})

   Bases: :py:obj:`abacusai.return_class.AbstractApiClass`

   Batch Prediction Version

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param batchPredictionVersion: The unique identifier of the batch prediction
   :type batchPredictionVersion: str
   :param batchPredictionId: The unique identifier of the batch prediction
   :type batchPredictionId: str
   :param status: The current status of the batch prediction
   :type status: str
   :param driftMonitorStatus: The status of the drift monitor for this batch prediction version
   :type driftMonitorStatus: str
   :param deploymentId: The deployment used to make the predictions
   :type deploymentId: str
   :param modelId: The model used to make the predictions
   :type modelId: str
   :param modelVersion: The model version used to make the predictions
   :type modelVersion: str
   :param predictionsStartedAt: Predictions start date and time
   :type predictionsStartedAt: str
   :param predictionsCompletedAt: Predictions completion date and time
   :type predictionsCompletedAt: str
   :param globalPredictionArgs: Argument(s) passed to every prediction call
   :type globalPredictionArgs: dict
   :param databaseOutputError: If true, there were errors reported by the database connector while writing
   :type databaseOutputError: bool
   :param totalPredictions: Number of predictions performed in this batch prediction job
   :type totalPredictions: int
   :param failedPredictions: Number of predictions that failed
   :type failedPredictions: int
   :param databaseConnectorId: The database connector to write the results to
   :type databaseConnectorId: str
   :param databaseOutputConfiguration: Contains information about where the batch predictions are written to
   :type databaseOutputConfiguration: dict
   :param explanations: If true, explanations for each prediction were created
   :type explanations: bool
   :param fileConnectorOutputLocation: Contains information about where the batch predictions are written to
   :type fileConnectorOutputLocation: str
   :param fileOutputFormat: The format of the batch prediction output (CSV or JSON)
   :type fileOutputFormat: str
   :param connectorType: Null if writing to internal console, else FEATURE_GROUP | FILE_CONNECTOR | DATABASE_CONNECTOR
   :type connectorType: str
   :param legacyInputLocation: The location of the input data
   :type legacyInputLocation: str
   :param error: Relevant error if the status is FAILED
   :type error: str
   :param driftMonitorError: Error message for the drift monitor of this batch predcition
   :type driftMonitorError: str
   :param monitorWarnings: Relevant warning if there are issues found in drift or data integrity
   :type monitorWarnings: str
   :param csvInputPrefix: A prefix to prepend to the input columns, only applies when output format is CSV
   :type csvInputPrefix: str
   :param csvPredictionPrefix: A prefix to prepend to the prediction columns, only applies when output format is CSV
   :type csvPredictionPrefix: str
   :param csvExplanationsPrefix: A prefix to prepend to the explanation columns, only applies when output format is CSV
   :type csvExplanationsPrefix: str
   :param databaseOutputTotalWrites: The total number of rows attempted to write (may be less than total_predictions if write mode is UPSERT and multiple rows share the same ID)
   :type databaseOutputTotalWrites: int
   :param databaseOutputFailedWrites: The number of failed writes to the Database Connector
   :type databaseOutputFailedWrites: int
   :param outputIncludesMetadata: If true, output will contain columns including prediction start time, batch prediction version, and model version
   :type outputIncludesMetadata: bool
   :param resultInputColumns: If present, will limit result files or feature groups to only include columns present in this list
   :type resultInputColumns: list[str]
   :param modelMonitorVersion: The version of the model monitor
   :type modelMonitorVersion: str
   :param algoName: The name of the algorithm used to train the model
   :type algoName: str
   :param algorithm: The algorithm that is currently deployed.
   :type algorithm: str
   :param batchInputs: Inputs to the batch prediction
   :type batchInputs: PredictionInput

   .. py:method:: __repr__()

      Return repr(self).


   .. py:method:: to_dict()

      Get a dict representation of the parameters in this class

      :returns: The dict value representation of the class parameters
      :rtype: dict


   .. py:method:: get_outliers_for_batch_prediction_feature(feature_name = None, nested_feature_name = None)

      Gets a list of outliers measured by a single feature (or overall) in an output feature group from a prediction.

      :param feature_name: Name of the feature to view the distribution of.
      :type feature_name: str
      :param nested_feature_name: Optionally, the name of the nested feature that the feature is in.
      :type nested_feature_name: str


   .. py:method:: download_batch_prediction_result_chunk(offset = 0, chunk_size = 10485760)

      Returns a stream containing the batch prediction results.

      :param offset: The offset to read from.
      :type offset: int
      :param chunk_size: The maximum amount of data to read.
      :type chunk_size: int


   .. py:method:: get_batch_prediction_connector_errors()

      Returns a stream containing the batch prediction database connection write errors, if any writes failed for the specified batch prediction job.

      :param batch_prediction_version: Unique string identifier of the batch prediction job to get the errors for.
      :type batch_prediction_version: str


   .. py:method:: refresh()

      Calls describe and refreshes the current object's fields

      :returns: The current object
      :rtype: BatchPredictionVersion


   .. py:method:: describe()

      Describes a Batch Prediction Version.

      :param batch_prediction_version: Unique string identifier of the Batch Prediction Version.
      :type batch_prediction_version: str

      :returns: The Batch Prediction Version.
      :rtype: BatchPredictionVersion


   .. py:method:: download_result_to_file(file)

      Downloads the batch prediction version in a local file.

      :param file: A file object opened in a binary mode e.g., file=open('/tmp/output', 'wb').
      :type file: file object


   .. py:method:: wait_for_predictions(timeout=86400)

      A waiting call until batch prediction version is ready.

      :param timeout: The waiting time given to the call to finish, if it doesn't finish by the allocated time, the call is said to be timed out.
      :type timeout: int, optional


   .. py:method:: wait_for_drift_monitor(timeout=86400)

      A waiting call until batch prediction drift monitor calculations are ready.

      :param timeout: The waiting time given to the call to finish, if it doesn't finish by the allocated time, the call is said to be timed out.
      :type timeout: int, optional


   .. py:method:: get_status(drift_monitor_status = False)

      Gets the status of the batch prediction version.

      :returns: A string describing the status of the batch prediction version, for e.g., pending, complete, etc.
      :rtype: str



