safe_torch_load#

composer.utils.safe_torch_load(composer_states_filepath, map_location='cpu', load_monolith_rank0_only=False)[source]#

Load a torch checkpoint, catching errors due to backwards compatibility issues.

Parameters
  • composer_states_filepath โ€“ The path to the checkpoint file.

  • map_location โ€“ The location to load the checkpoint to.

  • load_monolith_rank0_only โ€“ Whether the checkpoint is a monolith FSDP checkpoint.