model
Model implementation for MLTE artifacts.
ArtifactHeaderModel
Bases: BaseModel
The ArtifactHeaderModel contains the common metadata for all artifacts.
Source code in mlte/artifact/model.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
creator = None
class-attribute
instance-attribute
The user that created this artifact.
identifier
instance-attribute
The unique identifier for the artifact.
level = ArtifactLevel.VERSION
class-attribute
instance-attribute
The level this artifact will exist at (model or version).
timestamp = -1
class-attribute
instance-attribute
The timestamp of creation of this artifact, as Unix time.
type
instance-attribute
The type identfier for the artifact.
ArtifactLevel
Bases: StrEnum
Level the artifact will exist at (model or version).
Source code in mlte/artifact/model.py
20 21 22 23 24 25 26 27 | |
MODEL = 'model'
class-attribute
instance-attribute
Store this artifact at the model level.
VERSION = 'version'
class-attribute
instance-attribute
Store this artifact at the version level.
ArtifactModel
Bases: Filterable
The base model for all MLTE artifacts.
Source code in mlte/artifact/model.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
body = Field(..., discriminator='artifact_type')
class-attribute
instance-attribute
The artifact body.
header
instance-attribute
The artifact header.
post_validation_caller()
Called after validation, lets submodel do any needed post-processing.
Source code in mlte/artifact/model.py
72 73 74 75 76 | |