opaque
An opaque evaluation evidence, without semantics.
Opaque
Bases: Evidence
The 'default' Value instance for measurements that do not provide their own.
Source code in mlte/evidence/types/opaque.py
16 17 18 19 20 21 22 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 | |
data = data
instance-attribute
The raw output from measurement execution.
__eq__(other)
Compare Opaque instances for equality.
Source code in mlte/evidence/types/opaque.py
71 72 73 74 75 | |
__getitem__(key)
Access an item from the wrapped data object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
The key that identifies the item to access |
required |
Returns:
| Type | Description |
|---|---|
Any
|
The value associated with |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the key is not present |
Source code in mlte/evidence/types/opaque.py
56 57 58 59 60 61 62 63 64 65 | |
__init__(data)
Initialize an Opaque instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
The output of the measurement |
required |
Source code in mlte/evidence/types/opaque.py
21 22 23 24 25 26 27 28 29 | |
__setitem__(key, value)
Raise ValueError to indicate Opaque is read-only.
Source code in mlte/evidence/types/opaque.py
67 68 69 | |
__str__()
Return a string representation of this Evidence.
Source code in mlte/evidence/types/opaque.py
77 78 79 | |
from_model(model)
classmethod
Convert an opaque value model to its corresponding artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
BaseModel
|
The model representation |
required |
Returns:
| Type | Description |
|---|---|
Opaque
|
The real value |
Source code in mlte/evidence/types/opaque.py
40 41 42 43 44 45 46 47 48 | |
to_model()
Convert an opaque value artifact to its corresponding model.
Returns:
| Type | Description |
|---|---|
ArtifactModel
|
The artifact model |
Source code in mlte/evidence/types/opaque.py
31 32 33 34 35 36 37 38 | |