Skip to content

Checkpoint saving in training process #72

@cauphenuny

Description

@cauphenuny

Why there exists a statement checkpoint.clear() in LightningModelForTrain.on_save_checkpoint?

I think it would not prevent lightning from creating its own checkpoint because pl.Trainer.save_checkpoint would invoke DeepSpeedStrategy.save_checkpoint to produce a checkpoint even if checkpoint is cleared in on_save_checkpoint callback.

Moreover, this checkpoint can not be loaded by trainer.fit(ckpt_path=...) because of the missing of key pytorch-lightning_version, etc. The missing of these keys is caused by checkpoint.clear() in on_save_checkpoint callback. :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions