From 390b63373dd65c7ecab42e43392fa93420d1e6b0 Mon Sep 17 00:00:00 2001 From: Paul Wais Date: Mon, 11 Dec 2023 05:55:36 -0800 Subject: [PATCH] Trainer can now always save dataparser transform (#2653) * Trainer can now always save dataparser transform * appease the linter --------- Co-authored-by: Brent Yi --- nerfstudio/engine/trainer.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index 4cc296063e..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 @@ -225,11 +224,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):