NVIDIA / NVIDIA/physicsnemo

🚀[FEA]: allow control over checkpoint filename format in `save_checkoint`

Open
#1,175 5 comments 0 reactions 1 assignee View on GitHub

@CharlelieLrt is already working on this.

Since Oct 23, 2025.

enhancement
Dominant language
Python
Stars
3.3k
Forks
787
Avg merge
2d 21h
Merged PRs (30d)
27

Description

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

Critical (currently preventing usage)

Please provide a clear description of problem you would like to solve.

As reported by @nbren12 ,save_checkpoint(model=model, epoch=epoch, ...) will save the checkpoints file under the format <model_name>.<epoch>.mdlus, where <model_name> is inferred from the Module metadata. The resulting files are named for example: <model_name>.1.mdlus for epoch=1, <model_name>.10.mdlus for epoch=10, <model_name>.100.mdlus for epoch=100, etc.

Problem

The function save_checkpoint does not offer any control on the format of the checkpoint file name, for instance some users might require a format with 0-padded epoch number: <model_name>.000001.mdlus, etc.

Solution

Allow to pass an optional argument format to save_checkpoint, for example: save_checkpoint(model=model, epoch=epoch, format="{name}.{epoch:06d}") to set 0-padded epoch number, or save_checkpoint(model=model, epoch=epoch, format="{name}_{epoch:06d}") to modify the separator in the file anme.

Describe any alternatives you have considered

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.