gravitino.dto.model_version_dto.ModelVersionDTO

class gravitino.dto.model_version_dto.ModelVersionDTO(_version: int, _comment: str | None, _aliases: List[str] | None, _uri: str, _properties: Dict[str, str] | None, _audit: AuditDTO | None = None)

Bases: ModelVersion, DataClassJsonMixin

Represents a Model Version DTO (Data Transfer Object).

__init__(_version: int, _comment: str | None, _aliases: List[str] | None, _uri: str, _properties: Dict[str, str] | None, _audit: AuditDTO | None = None) → None

Methods

__init__(_version, _comment, _aliases, _uri, ...)

aliases()

The aliases of this model version.

audit_info()

comment()

The comment of this model version.

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

properties()

The properties of the model version.

schema(*[, infer_missing, only, exclude, ...])

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

uri()

The URI of the model artifact.

version()

The version of this model object.

Attributes

dataclass_json_config

aliases() → List[str] | None

The aliases of this model version. The aliases are the alternative names of the model version. The aliases are optional. The aliases are unique for a model version. If the alias is already set to one model version, it cannot be set to another model version.

Returns:

The aliases of the model version.

comment() → str | None

The comment of this model version. This comment can be different from the comment of the model to provide more detailed information about this version.

Returns:

The comment of the model version. None is returned if no comment is set.

properties() → Dict[str, str] | None

The properties of the model version. The properties are key-value pairs that can be used to store additional information of the model version. The properties are optional.

Returns:

The properties of the model version. An empty dictionary is returned if no properties are set.

uri() → str

The URI of the model artifact. The URI is the location of the model artifact. The URI can be a file path or a remote URI.

Returns:

The URI of the model artifact.

version() → int

The version of this model object. The version number is an integer number starts from 0. Each time the model checkpoint / snapshot is linked to the registered, the version number will be increased by 1.

Returns:

The version of the model object.