nvalchemi.training.CheckpointManifest#

pydantic model nvalchemi.training.CheckpointManifest[source]#

Unified checkpoint manifest and runtime container.

This Pydantic model serves a dual role:

  1. On-disk schemamanifest.json stores component names as sorted string lists together with metadata and associations.

  2. Runtime container — after load_checkpoint() hydrates the components, the same instance carries live (object, spec) tuples.

The models, optimizers, and schedulers fields accept either a list[str] (from JSON) or a dict[str, tuple] (from code). Serialization always produces sorted name lists via PlainSerializer.

Examples

>>> manifest = CheckpointManifest(
...     checkpoint_index=0, models={"main": None},
... )
>>> manifest.model_dump()["models"]
['main']
field schema_version: int = 1#

Manifest schema version.

field checkpoint_index: int [Required]#

Latest checkpoint index written.

field models: dict[str, tuple[Module, BaseSpec] | None] [Required]#

Model components keyed by name.

Constraints:
  • func = <function _component_serialize at 0xeb0b24699260>

  • json_schema_input_type = PydanticUndefined

  • return_type = list[str]

  • when_used = always

field optimizers: dict[str, tuple[Optimizer, BaseSpec] | None] [Optional]#

Optimizer components keyed by name.

Constraints:
  • func = <function _component_serialize at 0xeb0b24699260>

  • json_schema_input_type = PydanticUndefined

  • return_type = list[str]

  • when_used = always

field schedulers: dict[str, tuple[LRScheduler, BaseSpec] | None] [Optional]#

Scheduler components keyed by name.

Constraints:
  • func = <function _component_serialize at 0xeb0b24699260>

  • json_schema_input_type = PydanticUndefined

  • return_type = list[str]

  • when_used = always

field associations: dict[str, dict[str, Any]] [Optional]#

Model-centric linkage to optimizers/schedulers.