gravitino.dto.model_dto.ModelDTO

class gravitino.dto.model_dto.ModelDTO(_name: str, _comment: str | None, _properties: Dict[str, str] | None, _latest_version: int, _audit: AuditDTO | None = None)

Bases: Model, DataClassJsonMixin

Represents a Model DTO (Data Transfer Object).

__init__(_name: str, _comment: str | None, _properties: Dict[str, str] | None, _latest_version: int, _audit: AuditDTO | None = None) None

Methods

__init__(_name, _comment, _properties, ...)

audit_info()

comment()

The comment of the model object.

from_dict(kvs, *[, infer_missing])

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

latest_version()

The latest version of the model object.

name()

Returns:

properties()

The properties of the model object.

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

to_dict([encode_json])

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

Attributes

dataclass_json_config

comment() str | None

The comment of the model object. This is the general description of the model object. User can still add more detailed information in the model version.

Returns:

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

latest_version() int

The latest version of the model object. The latest version is the version number of the latest model checkpoint / snapshot that is linked to the registered model.

Returns:

The latest version of the model object.

name() str
Returns:

Name of the model object.

properties() Dict[str, str] | None

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

Users can still specify the properties in the model version for different information.

Returns:

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