Log Metadata

class py123d.datatypes.LogMetadata[source]

Class to hold metadata information about a log.

Public Data Attributes:

dataset

The dataset name in lowercase.

split

Data split name, typically {dataset_name}_{train/val/test}.

log_name

Name of the log file.

location

Location of the log data.

version

Version of the py123d library used to create this log metadata (not used currently).

map_metadata

Map metadata for this log, if available.

Public Methods:

from_dict(data_dict)

Create a LogMetadata instance from a Python dictionary.

to_dict()

Convert the LogMetadata instance to a JSON-serializable dictionary.

Inherited from BaseMetadata

to_dict()

Serialize the metadata instance to a plain Python dictionary.

from_dict(data_dict)

Construct a metadata instance from a plain Python dictionary.


property dataset: str

The dataset name in lowercase.

property split: str

Data split name, typically {dataset_name}_{train/val/test}.

property log_name: str

Name of the log file.

property location: str | None

Location of the log data.

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 LogMetadata instance 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:

LogMetadata

Returns:

A LogMetadata instance.

to_dict()[source]

Convert the LogMetadata instance to a JSON-serializable dictionary.

Return type:

Dict

Returns:

A dictionary representation of the log metadata.