Skip to content

model

mlte/validation/model.py

Model implementation for the ValidatedSpec artifact.

ResultModel

Bases: BaseModel

A description of a Result.

Source code in mlte/validation/model.py
15
16
17
18
19
20
21
22
23
24
25
class ResultModel(BaseModel):
    """A description of a Result."""

    type: str
    """The type of result."""

    message: str
    """The message indicating the reason for status."""

    metadata: Optional[EvidenceMetadata]
    """Evidence metadata associated with the value."""

message instance-attribute

The message indicating the reason for status.

metadata instance-attribute

Evidence metadata associated with the value.

type instance-attribute

The type of result.

ValidatedSpecModel

Bases: BaseModel

The model implementation for the ValidatedSpec artifact.

Source code in mlte/validation/model.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class ValidatedSpecModel(BaseModel):
    """The model implementation for the ValidatedSpec artifact."""

    artifact_type: Literal[ArtifactType.VALIDATED_SPEC] = (
        ArtifactType.VALIDATED_SPEC
    )

    """Union discriminator."""

    spec_identifier: str = ""
    """The identifier of the Spec this ValidatedSpec came from."""

    spec: Optional[SpecModel] = None
    """A link to the actual Spec details."""

    results: Dict[str, Dict[str, ResultModel]] = {}
    """A list of validation results, for each measurement id, grouped by QACategory."""

artifact_type = ArtifactType.VALIDATED_SPEC class-attribute instance-attribute

Union discriminator.

results = {} class-attribute instance-attribute

A list of validation results, for each measurement id, grouped by QACategory.

spec = None class-attribute instance-attribute

A link to the actual Spec details.

spec_identifier = '' class-attribute instance-attribute

The identifier of the Spec this ValidatedSpec came from.