You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added `training.save_dir` for periodic checkpoints and
`validating.save_best_dir` for best-validation checkpoints.
* Added `training.ckpt_keep_ratio` for ratio-based sliding-window
checkpoint retention.
* **Bug Fixes**
* Improved checkpoint filename/“latest” aliasing and symlink/pointer
behavior for periodic and EMA checkpoints when `save_dir` is set.
* Ensured “best” checkpoints are written only to the configured
best-checkpoint directory.
* Eagerly creates the validator checkpoint directory during
initialization.
* **Documentation**
* Documented `save_dir` and `ckpt_keep_ratio`; updated the training
advanced guide and example config.
* **Tests**
* Added unit tests for retention rounding/edge cases and filesystem
tests for redirecting checkpoints and custom best-checkpoint locations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: doc/train/training-advanced.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,8 @@ Other keys in the {ref}`training <training>` section are explained below:
103
103
- {ref}`disp_file <training/disp_file>` The file for printing learning curve.
104
104
- {ref}`disp_freq <training/disp_freq>` The frequency of printing learning curve. Set in the unit of training steps
105
105
- {ref}`save_freq <training/save_freq>` The frequency of saving checkpoint.
106
+
- {ref}`save_dir <training/save_dir>` The directory where periodic checkpoints are written (PyTorch backend). It is created recursively if missing, while the `model.ckpt.pt` symlinks and the `checkpoint` pointer file stay in the working directory. Defaults to the working directory.
107
+
- {ref}`ckpt_keep_ratio <training/ckpt_keep_ratio>` An alternative to `max_ckpt_keep` (PyTorch backend) that keeps a sliding window of `ceil(ckpt_keep_ratio * ceil(numb_steps / save_freq))` most recent checkpoints, i.e. the final `ckpt_keep_ratio` fraction of the run by step. It overrides `max_ckpt_keep` (and `ema_ckpt_keep`) when set, and works the same whether the run length is given by `numb_steps` or `numb_epoch`.
0 commit comments