Skip to content

Model Version Representation

ModelVersionRepresentation

Represents the metadata of a Vectice model version.

A Model Version Representation shows information about a specific version of a model from the Vectice app. It makes it easier to get and read this information through the API.

Hint

A model version ID starts with 'MDV-XXX'. Retrieve the ID in the Vectice App, then use the ID with the following methods to get the model version: connect.model_version('MDV-XXX') or connect.browse('MDV-XXX') (see Connection page).

Attributes:

Name Type Description
id str

The unique identifier of the model version.

project_id str

The identifier of the project to which the model version belongs.

name str

The name of the model version. For model versions it corresponds to the version number.

status str

The status of the model version (EXPERIMENTATION, STAGING, PRODUCTION, or RETIRED).

description str

The description of the model version.

technique str

The technique used by the model version.

library str

The library used by the model version.

metrics List[Dict[str, Any]]

The metrics associated with the model version.

properties List[Dict[str, Any]]

The properties associated with the model version.

model_representation ModelRepresentation

Holds informations about the source model linked to the model version, where all versions are grouped together.

__init__

__init__(output, client)

asdict

asdict()

Transform the ModelVersionRepresentation into a organised dictionary.

Returns:

Type Description
Dict[str, Any]

The object represented as a dictionary

metrics_as_dataframe

metrics_as_dataframe()

Transforms the metrics of the ModelVersionRepresentation into a DataFrame for better readability.

Returns:

Type Description
DataFrame

A pandas DataFrame containing the metrics of the model version.

properties_as_dataframe

properties_as_dataframe()

Transforms the properties of the ModelVersionRepresentation into a DataFrame for better readability.

Returns:

Type Description
DataFrame

A pandas DataFrame containing the properties of the model version.

update

update(
    status=None,
    metrics=None,
    properties=None,
    attachments=None,
)

Update the Model Version from the API.

Parameters:

Name Type Description Default
status str | None

The new status of the model. Accepted values are EXPERIMENTATION, STAGING, PRODUCTION and RETIRED.

None
properties dict[str, str | int] | list[Property] | Property | None

The new properties of the model.

None
metrics dict[str, int | float] | list[Metric] | Metric | None

The new metrics of the model.

None
attachments str | list[str] | None

The new attachments of the model.

None

Returns:

Type Description
None

None