artifact
Artifact implementation for MLTE Evidence.
T = TypeVar('T', bound='Evidence')
module-attribute
Needed for generic return of type.
Evidence
Bases: Artifact, ABC
The Evidence class serves as the base class of all semantically-enriched measurement evaluation evidence. The Evidence provides a common interface for inspecting the results of measurement evaluation, and also encapsulates the functionality required to uniquely associate evaluation results with the originating measurement.
Source code in mlte/evidence/artifact.py
26 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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
metadata = None
instance-attribute
Metadata has not been initialized yet.
type = ArtifactType.EVIDENCE
class-attribute
instance-attribute
Class attribute indicating type.
typename = meta.get_qualified_name(self.__class__)
instance-attribute
The class type of the evidence itself.
__init__()
Initialize a Evidence instance
Source code in mlte/evidence/artifact.py
39 40 41 42 43 44 45 46 47 48 | |
__str__()
Return a string representation.
Source code in mlte/evidence/artifact.py
59 60 61 | |
from_model(_)
abstractmethod
classmethod
Convert a evidence model to its corresponding artifact. NOTE: To cope with polymorphism, the Evidence artifact type does not define this required method itself; instead, it is delegated to subclasses that implement concrete types
Source code in mlte/evidence/artifact.py
97 98 99 100 101 102 103 104 105 106 | |
load(identifier=None)
classmethod
Load a Evidence from the configured global session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
Optional[str]
|
The identifier for the artifact. If None, the default id is used. |
None
|
Source code in mlte/evidence/artifact.py
167 168 169 170 171 172 173 174 175 | |
load_all()
staticmethod
Loads all Evidences stored for the current session's context and store.
Source code in mlte/evidence/artifact.py
133 134 135 136 137 138 139 | |
load_all_with(context, store)
staticmethod
Loads all Evidences stored for the given context and store.
Source code in mlte/evidence/artifact.py
141 142 143 144 145 146 147 | |
to_model()
abstractmethod
Convert a evidence artifact to its corresponding model. NOTE: To cope with polymorphism, the Evidence artifact type does not define this required method itself; instead, it is delegated to subclasses that implement concrete types
Source code in mlte/evidence/artifact.py
87 88 89 90 91 92 93 94 95 | |
with_metadata(evidence_metadata)
Sets the evidence metadata, returns updated object.
Source code in mlte/evidence/artifact.py
50 51 52 53 54 55 56 57 | |