mapping_networks.checkpoint.CheckpointSchema

class mapping_networks.checkpoint.CheckpointSchema(schema_version: int, package_version: str, latent_state: dict[str, ~typing.Any], mapper_buffers: dict[str, ~typing.Any], parameter_spec_names: list[tuple[str, list[int]]], config: dict[str, ~typing.Any] | None = None, trainer_state: dict[str, ~typing.Any] | None = None, metadata: dict[str, ~typing.Any] = <factory>)

All fields written to / read from a checkpoint file.

schema_version

Integer incremented on breaking format changes.

Type:

int

package_version

mapping_networks.__version__ at save time.

Type:

str

latent_state

Ordered state_dict of trainable latent tensors only.

Type:

dict[str, Any]

mapper_buffers

Buffer state_dict required for deterministic reconstruction (projection matrices, running statistics …).

Type:

dict[str, Any]

parameter_spec_names

Ordered list of (name, shape) tuples from the target ParameterSpec. Validated on load.

Type:

list[tuple[str, list[int]]]

config

Optional serialised MappingConfig dict (may be None).

Type:

dict[str, Any] | None

trainer_state

Optional dict with optimizer/scheduler/epoch entries.

Type:

dict[str, Any] | None

metadata

User-supplied annotations, e.g. dataset or description.

Type:

dict[str, Any]

__init__(schema_version: int, package_version: str, latent_state: dict[str, ~typing.Any], mapper_buffers: dict[str, ~typing.Any], parameter_spec_names: list[tuple[str, list[int]]], config: dict[str, ~typing.Any] | None = None, trainer_state: dict[str, ~typing.Any] | None = None, metadata: dict[str, ~typing.Any] = <factory>) None

Methods

__init__(schema_version, package_version, ...)

Attributes