Skip to content

Commit f129bee

Browse files
committed
Comment out _set_parent call in instantiate function
Use deepcopied parent in instantiate instead of old parent to avoid unexpected side effects
1 parent 0ede840 commit f129bee

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

hydra/_internal/instantiate/_instantiate2.py

-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ def instantiate(config: Any, *args: Any, **kwargs: Any) -> Any:
211211
config_copy._set_flag(
212212
flags=["allow_objects", "struct", "readonly"], values=[True, False, False]
213213
)
214-
config_copy._set_parent(config._get_parent())
215214
config = config_copy
216215

217216
if kwargs:
@@ -232,7 +231,6 @@ def instantiate(config: Any, *args: Any, **kwargs: Any) -> Any:
232231
config_copy._set_flag(
233232
flags=["allow_objects", "struct", "readonly"], values=[True, False, False]
234233
)
235-
config_copy._set_parent(config._get_parent())
236234
config = config_copy
237235

238236
OmegaConf.resolve(config)

0 commit comments

Comments
 (0)