Log Metadata¶
- class py123d.datatypes.LogMetadata[source]¶
Class to hold metadata information about a log.
Public Data Attributes:
datasetThe dataset name in lowercase.
splitData split name, typically
{dataset_name}_{train/val/test}.log_nameName of the log file.
locationLocation of the log data.
versionVersion of the py123d library used to create this log metadata (not used currently).
map_metadataMap metadata for this log, if available.
Public Methods:
from_dict(data_dict)Create a
LogMetadatainstance from a Python dictionary.to_dict()Convert the
LogMetadatainstance to a JSON-serializable dictionary.Inherited from
BaseMetadatato_dict()Serialize the metadata instance to a plain Python dictionary.
from_dict(data_dict)Construct a metadata instance from a plain Python dictionary.
- property version: str¶
Version of the py123d library used to create this log metadata (not used currently).
- property map_metadata: MapMetadata | None¶
Map metadata for this log, if available.
- classmethod from_dict(data_dict)[source]¶
Create a
LogMetadatainstance from a Python dictionary.Deserializes both basic log fields and modality metadata (if present). Older dictionaries that only contain basic fields are handled gracefully.
- Parameters:
data_dict (
Dict) – Dictionary containing log metadata.- Return type:
- Returns:
A
LogMetadatainstance.
- to_dict()[source]¶
Convert the
LogMetadatainstance to a JSON-serializable dictionary.- Return type:
- Returns:
A dictionary representation of the log metadata.