scaffold.entrypoints.entrypoint =============================== .. py:module:: scaffold.entrypoints.entrypoint Attributes ---------- .. autoapisummary:: scaffold.entrypoints.entrypoint.ENTRYPOINT_CONFIG_TYPE scaffold.entrypoints.entrypoint.logger Classes ------- .. autoapisummary:: scaffold.entrypoints.entrypoint.Entrypoint Module Contents --------------- .. py:class:: Entrypoint(config: ENTRYPOINT_CONFIG_TYPE, contexts: List[contextlib.AbstractContextManager] = None) Bases: :py:obj:`abc.ABC`, :py:obj:`Generic`\ [\ :py:obj:`ENTRYPOINT_CONFIG_TYPE`\ ] Helper class that provides a standard way to create an ABC using inheritance. Initialize entrypoint with a configuration of the specified type. Given context managers will be appended after the ones are found in the config. :param config: The entrypoint configuration object of the specified type. :type config: EntrypointConf :param contexts: Context managers that should be added next to the ones specified in the config. :type contexts: List[AbstractContextManager] .. py:method:: __call__(*args, **kwargs) -> Any Wraps self.run() within initialized contexts. Arguments and keyword arguments will be passed to run(). .. py:method:: from_config_name_or_class(config_name_or_class: Union[str, scaffold.hydra.config_helpers.StructuredConfig], config_dir: str = None, overrides: List[str] = None, contexts: List[contextlib.AbstractContextManager] = None) -> Entrypoint :classmethod: Temporarily initialized hydra, composes the config and initialized the entrypoint. :param config_name_or_class: Name of the config file or EntrypointConf class. :type config_name_or_class: str :param config_dir: Absolute path to the directory that should be added to the searchpath. :type config_dir: str :param overrides: Hydra overrides that get applied during config composition. :type overrides: List[str] :param contexts: Contexts that should be added to the ones defined in the config. :type contexts: List[AbstractContextManager] :returns: Initialized Entrypoint instance. .. py:method:: run(*args, **kwargs) -> Any :abstractmethod: Abstract function that has to be overwritten. .. py:attribute:: config :type: ENTRYPOINT_CONFIG_TYPE .. py:data:: ENTRYPOINT_CONFIG_TYPE .. py:data:: logger