abacusai.model_version

Module Contents

Classes

ModelVersion

A version of a model

class abacusai.model_version.ModelVersion(client, modelVersion=None, status=None, modelId=None, modelConfig=None, modelPredictionConfig=None, trainingStartedAt=None, trainingCompletedAt=None, datasetVersions=None, error=None, pendingDeploymentIds=None, failedDeploymentIds=None)

Bases: abacusai.return_class.AbstractApiClass

A version of a model

Parameters
  • client (ApiClient) – An authenticated API Client instance

  • modelVersion (str) – The unique identifier of a model version.

  • status (str) – The current status of the model.

  • modelId (str) – A reference to the model this version belongs to.

  • modelConfig (dict) – The training config options used to train this model.

  • modelPredictionConfig (dict) –

  • trainingStartedAt (str) – The start time and date of the training process.

  • trainingCompletedAt (str) – The end time and date of the training process.

  • datasetVersions (list of unique string identifiers) – Comma separated list of Dataset version IDs that this refresh pipeline run is monitoring.

  • error (str) – Relevant error if the status is FAILED.

  • pendingDeploymentIds (list) – List of deployment IDs where deployment is pending.

  • failedDeploymentIds (list) – List of failed deployment IDs.

__repr__(self)

Return repr(self).

to_dict(self)

Get a dict representation of the parameters in this class

Returns

The dict value representation of the class parameters

Return type

dict

delete(self)

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

Parameters

model_version (str) – The ID of the model version to delete.

refresh(self)

Calls describe and refreshes the current object’s fields

Returns

The current object

Return type

ModelVersion

describe(self)

Retrieves a full description of the specified model version

Parameters

model_version (str) – The unique version ID of the model version

Returns

A model version.

Return type

ModelVersion

get_training_logs(self, stdout=False, stderr=False)

Returns training logs for the model.

Parameters
  • stdout (bool) – Set True to get info logs

  • stderr (bool) – Set True to get error logs

Returns

A function logs.

Return type

FunctionLogs

wait_for_training(self, timeout=None)

A waiting call until model gets trained.

Parameters

timeout (int, optional) – 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.

get_status(self)

Gets the status of the model version under training.

Returns

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

Return type

str