artifact
mlte/value/artifact.py
Artifact implementation for MLTE values.
Value
Bases: Artifact
The Value class serves as the base class of all semantically-enriched measurement evaluation values. The Value 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/value/artifact.py
23 24 25 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 |
|
metadata = metadata
instance-attribute
Evidence metadata associated with the value.
typename = type(instance).__name__
instance-attribute
The type of the value itself.
__init__(instance, metadata)
Initialize a Value instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance
|
Value
|
The subclass instance |
required |
metadata
|
EvidenceMetadata
|
Evidence metadata associated with the value |
required |
Source code in mlte/value/artifact.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
from_model(_)
classmethod
Convert a value model to its corresponding artifact. NOTE: To cope with polymorphism, the Value artifact type does not define this required method itself; instead, it is delegated to subclasses that implement concrete types
Source code in mlte/value/artifact.py
57 58 59 60 61 62 63 64 65 |
|
get_class_path()
classmethod
Returns the full path to this class, including module.
Source code in mlte/value/artifact.py
96 97 98 99 |
|
load_all()
staticmethod
Loads all artifact models of the given type for the current session.
Source code in mlte/value/artifact.py
67 68 69 70 71 |
|
load_all_with(context, store)
staticmethod
Loads all artifact models of the given type for the given context and store.
Source code in mlte/value/artifact.py
73 74 75 76 77 78 79 |
|
to_model()
Convert a value artifact to its corresponding model. NOTE: To cope with polymorphism, the Value artifact type does not define this required method itself; instead, it is delegated to subclasses that implement concrete types
Source code in mlte/value/artifact.py
48 49 50 51 52 53 54 55 |
|