Passing callable as instantiate
_target_
fails for nested classes
#1914
Labels
bug
Something isn't working
instantiate
_target_
fails for nested classes
#1914
Hydra's
instantiate
function allows users to pass a callable (rather than astring) via the
_target_
keyword argument. For example:However, this fails when a nested class is passed as the
_target_
:The error message indicates that
__main__.B
could not be found. This indicates a mistake in handling the keyword argument_target_=A.B
: it is__main__.A.B
that should have been looked up, not__main__.B
.The text was updated successfully, but these errors were encountered: