From cb230e07a9f7717b707eee56fa5a5fabfd7ad81f Mon Sep 17 00:00:00 2001 From: Ethan Weber Date: Fri, 7 Oct 2022 11:42:36 -0700 Subject: [PATCH] fix optimizer dict (#729) * bump version * optimizer doc fix * Update conf.py * Update pyproject.toml --- nerfstudio/engine/optimizers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nerfstudio/engine/optimizers.py b/nerfstudio/engine/optimizers.py index 5048fe26c5..500e2328a0 100644 --- a/nerfstudio/engine/optimizers.py +++ b/nerfstudio/engine/optimizers.py @@ -41,9 +41,8 @@ class OptimizerConfig(base_config.PrintableConfig): # but also not sure how to go about passing things into predefined torch objects. def setup(self, params) -> Any: """Returns the instantiated object using the config.""" - kwargs = vars(self) - if "_target" in kwargs: - del kwargs["_target"] + kwargs = vars(self).copy() + kwargs.pop("_target") return self._target(params, **kwargs)