[Feature Request] Implement hydra.utils.get_object
to locate arbitrary object.
#1975
Labels
Milestone
hydra.utils.get_object
to locate arbitrary object.
#1975
The
hydra.utils.get_class
andhydra.utils.get_method
functions are useful to look up python objects based on dot-paths.Internally, these functions use the same mechanism as the
hydra.utils.instantiate
function.These two functions fail when looking up an object that is not a type and is not callable:
I propose a
hydra.utils.get_object
function that has the same behavior asget_class
andget_method
but is more permissive with regard to non-callable objects.For a motivating use-case, see this stackoverflow post.
The text was updated successfully, but these errors were encountered: