:py:mod:`abacusai.model_version`
================================

.. py:module:: abacusai.model_version


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

Classes
~~~~~~~

.. autoapisummary::

   abacusai.model_version.ModelVersion




.. py:class:: ModelVersion(client, modelVersion=None, status=None, modelId=None, modelConfig=None, modelPredictionConfig=None, trainingStartedAt=None, trainingCompletedAt=None, datasetVersions=None, featureGroupVersions=None, error=None, pendingDeploymentIds=None, failedDeploymentIds=None, cpuSize=None, memory=None, automlComplete=None, trainingFeatureGroupIds=None, codeSource={})

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

   A version of a model

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param modelVersion: The unique identifier of a model version.
   :type modelVersion: str
   :param status: The current status of the model.
   :type status: str
   :param modelId: A reference to the model this version belongs to.
   :type modelId: str
   :param modelConfig: The training config options used to train this model.
   :type modelConfig: dict
   :param modelPredictionConfig: The prediction config options for the model.
   :type modelPredictionConfig: dict
   :param trainingStartedAt: The start time and date of the training process.
   :type trainingStartedAt: str
   :param trainingCompletedAt: The end time and date of the training process.
   :type trainingCompletedAt: str
   :param datasetVersions: Comma separated list of Dataset version IDs that this refresh pipeline run is monitoring.
   :type datasetVersions: list of unique string identifiers
   :param featureGroupVersions:
   :type featureGroupVersions: list
   :param error: Relevant error if the status is FAILED.
   :type error: str
   :param pendingDeploymentIds: List of deployment IDs where deployment is pending.
   :type pendingDeploymentIds: list
   :param failedDeploymentIds: List of failed deployment IDs.
   :type failedDeploymentIds: list
   :param cpuSize: Cpu size specified for the python model training.
   :type cpuSize: str
   :param memory: Memory in GB specified for the python model training.
   :type memory: int
   :param automlComplete: If true, all algorithms have compelted training
   :type automlComplete: bool
   :param trainingFeatureGroupIds: The unique identifiers of the feature group used as the inputs during training to create this ModelVersion.
   :type trainingFeatureGroupIds: list of unique string identifiers
   :param codeSource: If a python model, information on where the source code
   :type codeSource: CodeSource

   .. 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:: delete()

      Deletes the specified model version. Model Versions which are currently used in deployments cannot be deleted.

      :param model_version: The ID of the model version to delete.
      :type model_version: str


   .. py:method:: export_model_artifact_as_feature_group(table_name, artifact_type)

      Exports metric artifact data for a model as a feature group.

      :param table_name: The name of the feature group table to create.
      :type table_name: str
      :param artifact_type: An EvalArtifact enum of which artifact to export.
      :type artifact_type: str

      :returns: The created feature group.
      :rtype: FeatureGroup


   .. py:method:: refresh()

      Calls describe and refreshes the current object's fields

      :returns: The current object
      :rtype: ModelVersion


   .. py:method:: describe()

      Retrieves a full description of the specified model version

      :param model_version: The unique version ID of the model version
      :type model_version: str

      :returns: A model version.
      :rtype: ModelVersion


   .. py:method:: get_training_data_logs()

      Retrieves the data preparation logs during model training.

      :param model_version: The unique version ID of the model version
      :type model_version: str

      :returns: A list of logs.
      :rtype: DataPrepLogs


   .. py:method:: get_training_logs(stdout = False, stderr = False)

      Returns training logs for the model.

      :param stdout: Set True to get info logs
      :type stdout: bool
      :param stderr: Set True to get error logs
      :type stderr: bool

      :returns: A function logs.
      :rtype: FunctionLogs


   .. py:method:: wait_for_training(timeout=None)

      A waiting call until model gets trained.

      :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_full_automl(timeout=None)

      A waiting call until full AutoML cycle is completed.

      :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()

      Gets the status of the model version under training.

      :returns: A string describing the status of a model training (pending, complete, etc.).
      :rtype: str



