validated_spec
mlte/spec/validated_spec.py
ValidatedSpec class implementation.
ValidatedSpec
Bases: Artifact
ValidatedSpec represents a spec with validated results.
Source code in mlte/validation/validated_spec.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
results = results
instance-attribute
The validation results for the spec, by QACategory.
spec = spec
instance-attribute
The spec that we validated.
__eq__(other)
Test ValidatedSpec instance for equality.
Source code in mlte/validation/validated_spec.py
138 139 140 141 142 |
|
__init__(identifier=DEFAULT_VALIDATED_SPEC_ID, spec=Spec(), results={})
Initialize a ValidatedSpec instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spec
|
Spec
|
The Spec |
Spec()
|
results
|
Dict[str, Dict[str, Result]]
|
The validation Results for the Spec |
{}
|
Source code in mlte/validation/validated_spec.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
from_model(model)
classmethod
Deserialize ValidatedSpec content from model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
ArtifactModel
|
The model |
required |
Returns:
Type | Description |
---|---|
ValidatedSpec
|
The deserialized specification |
Source code in mlte/validation/validated_spec.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
get_default_id()
staticmethod
Overriden
Source code in mlte/validation/validated_spec.py
133 134 135 136 |
|
print_results(type='all')
Prints the validated results per property, can be filtered by result type.
Source code in mlte/validation/validated_spec.py
120 121 122 123 124 125 126 127 128 129 130 131 |
|
to_model()
Generates a model representation of the ValidatedSpec.
Returns:
Type | Description |
---|---|
ArtifactModel
|
The serialized model |
Source code in mlte/validation/validated_spec.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|