modelzoo.common.pytorch.model_utils.checkpoint_converters.base_converter#

Functions

convert_dataloader_checkpoint

Converts DataLoader state files saved in release 1.9 to DataLoader checkpoint format for the new map and iterable DataLoaders in MZ in release 2.0.

get_artifact_dir

Classes

BaseCheckpointConverter

Converts between checkpoint state_dict formats.

BaseCheckpointConverter_CS_CS

BaseCheckpointConverter_HF_CS

HF checkpoints contain model only while CS checkpoints package model, optimizer, and lr_scheduler into a single checkpoint.

BaseCheckpointConverter_UnpackedHF_PackedCS

Converter between a set of unpacked HF checkpoints and a single packed CS checkpoint.

BaseConfigConverter

BaseConfigConverter_CS_CS

CS packages model, optimizer, and lr_scheduler into a single config.

BaseConfigConverter_HF_CS

CS packages model, optimizer, and lr_scheduler into a single config.

BaseConfigConverter_UnpackedHF_PackedCS

Converter between a set of unpacked HF configs and a single packed CS configs.

BaseDictionaryConverter

A dictionary converter represents a pair of two dictionary formats that can be converted between each other.

ConversionRule

ConversionRule defines a "rule" which:

EquivalentSubkey

EquivalentSubkey defines the bidirectional relationship between subkeys of a model's checkpoint.

FormatVersions

Exceptions

ConfigConversionError

Raised when a config cannot be converted