fix optimizer dict (#729)

* bump version

* optimizer doc fix

* Update conf.py

* Update pyproject.toml
This commit is contained in:
Ethan Weber authored and GitHub committed 2022-10-07 11:42:36 -07:00
1 parent ee94f23f83
commit 45e5b528e5
1 file changed
+2 -3
+2 -3
View File
@@ -41,9 +41,8 @@ class OptimizerConfig(base_config.PrintableConfig):
# but also not sure how to go about passing things into predefined torch objects. # but also not sure how to go about passing things into predefined torch objects.
def setup(self, params) -> Any: def setup(self, params) -> Any:
"""Returns the instantiated object using the config.""" """Returns the instantiated object using the config."""
kwargs = vars(self) kwargs = vars(self).copy()
if "_target" in kwargs: kwargs.pop("_target")
del kwargs["_target"]
return self._target(params, **kwargs) return self._target(params, **kwargs)