From c0e8b316e4ce8fa541ef748070f6f4ab2fd49480 Mon Sep 17 00:00:00 2001 From: Paul Wais Date: Thu, 7 Dec 2023 18:49:40 -0800 Subject: [PATCH 1/2] Trainer can now always save dataparser transform --- nerfstudio/engine/trainer.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index 4cc296063e..0215d36fcf 100644 --- a/nerfstudio/engine/trainer.py +++ b/nerfstudio/engine/trainer.py @@ -225,11 +225,9 @@ def train(self) -> None: """Train the model.""" assert self.pipeline.datamanager.train_dataset is not None, "Missing DatsetInputs" - # don't want to call save_dataparser_transform if pipeline's datamanager does not have a dataparser - if isinstance(self.pipeline.datamanager, VanillaDataManager): - self.pipeline.datamanager.train_dataparser_outputs.save_dataparser_transform( - self.base_dir / "dataparser_transforms.json" - ) + self.pipeline.datamanager.train_dataparser_outputs.save_dataparser_transform( + self.base_dir / "dataparser_transforms.json" + ) self._init_viewer_state() with TimeWriter(writer, EventName.TOTAL_TRAIN_TIME): From af3a192d8718bce44ac548a20f70b736e6f83e6c Mon Sep 17 00:00:00 2001 From: Paul Wais Date: Thu, 7 Dec 2023 23:20:48 -0800 Subject: [PATCH 2/2] appease the linter --- nerfstudio/engine/trainer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index 0215d36fcf..2930db892e 100644 --- a/nerfstudio/engine/trainer.py +++ b/nerfstudio/engine/trainer.py @@ -28,7 +28,6 @@ import torch from nerfstudio.configs.experiment_config import ExperimentConfig -from nerfstudio.data.datamanagers.base_datamanager import VanillaDataManager from nerfstudio.engine.callbacks import TrainingCallback, TrainingCallbackAttributes, TrainingCallbackLocation from nerfstudio.engine.optimizers import Optimizers from nerfstudio.pipelines.base_pipeline import VanillaPipeline