Skip to content

Commit

Permalink
fix optimizer dict (nerfstudio-project#729)
Browse files Browse the repository at this point in the history
* bump version

* optimizer doc fix

* Update conf.py

* Update pyproject.toml
  • Loading branch information
ethanweber authored Oct 7, 2022
1 parent d2eff94 commit cb230e0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nerfstudio/engine/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit cb230e0

Please sign in to comment.