added limit to how many models to save (#546)

This commit is contained in:
evonneng authored and GitHub committed 2022-09-26 14:17:04 -07:00
1 parent 399e5cac6d
commit 800be33cf3
2 files changed
+7

No files matched your search

+2
View File
@@ -146,6 +146,8 @@ class TrainerConfig(PrintableConfig):
"""whether or not to use mixed precision for training"""
relative_model_dir: Path = Path("nerfactory_models/")
"""relative path to save all checkpoints"""
num_ckpt_to_save: int = 1
"""number of latest checkpoints that we want to save. Default 1 saves only the latest model"""
# optional parameters if we want to resume training
load_dir: Optional[Path] = None
"""optionally specify a pre-trained model directory to load from"""