modosaic.core.experiment_artifact¶
modosaic.core.experiment_artifact ¶
ExperimentArtifact
dataclass
¶
ExperimentArtifact(relative_path, payload, kind)
Artifact payload plus the relative path where it should be saved.
Attributes:
| Name | Type | Description |
|---|---|---|
relative_path |
Path
|
Path below the experiment directory. |
payload |
T
|
Artifact content. |
kind |
ExperimentArtifactKind
|
Serialization strategy used by |
array
classmethod
¶
array(relative_path, payload)
Create a NumPy .npy array artifact.
Source code in modosaic/core/experiment_artifact.py
41 42 43 44 | |
array_collection
classmethod
¶
array_collection(relative_path, payload)
Create a NumPy .npz array-collection artifact.
Source code in modosaic/core/experiment_artifact.py
46 47 48 49 50 51 52 53 | |
bytes
classmethod
¶
bytes(relative_path, payload)
Create a raw bytes artifact.
Source code in modosaic/core/experiment_artifact.py
65 66 67 68 | |
image
classmethod
¶
image(relative_path, payload)
Create a PIL image artifact.
Source code in modosaic/core/experiment_artifact.py
55 56 57 58 | |
json
classmethod
¶
json(relative_path, payload)
Create a JSON artifact.
Source code in modosaic/core/experiment_artifact.py
60 61 62 63 | |
text
classmethod
¶
text(relative_path, payload)
Create a UTF-8 text artifact.
Source code in modosaic/core/experiment_artifact.py
36 37 38 39 | |
ExperimentArtifactKind ¶
Bases: StrEnum
Supported artifact payload types for experiment persistence.