ksuit.factory.base.reflection_utils =================================== .. py:module:: ksuit.factory.base.reflection_utils Attributes ---------- .. autoapisummary:: ksuit.factory.base.reflection_utils.logger Functions --------- .. autoapisummary:: ksuit.factory.base.reflection_utils.all_ctor_kwarg_names ksuit.factory.base.reflection_utils.class_constructor_from_class_path Module Contents --------------- .. py:data:: logger .. py:function:: all_ctor_kwarg_names(cls) Returns all names of kwargs in of a type (including the kwargs of all parent classes). :param cls: Type from which to retrieve the names of kwargs. :returns: A list of names of kwargs of the type. .. py:function:: class_constructor_from_class_path(class_path) Creates a callable that constructs an object from a classpath. This callable is either a `type` (if no further kwargs are needed to be passed) or a `partial` otherwise. This is equivalent to Hydra instantiation with _target_, which is also based on class paths. :param class_path: Fully specified module path of the object. For example: `"torch.optim.SGD"` or `"ksuit.callbacks.CheckpointCallback"`. :returns: A callable that constructs the object.