Hi Team, I am using kedro version 0.17.3 .. I have...
# questions
v
Hi Team, I am using kedro version 0.17.3 .. I have created custom hooks , I am able to run the pipeline but hooks are not running for me… settings.py-
Copy code
HOOKS = (ProjectHooks(),DataValidationHook())
CONTEXT_CLASS = ProjectContext
context.py-
Copy code
class ProjectContext(KedroContext):
    """Project context.

    Users can override the remaining methods from the parent class here,
    or create new ones (e.g. as required by plugins)
    """

    hooks = ProjectHooks()

    def __init__(
        self,
        package_name: str,
        project_path: Union[Path, str],
        env: str = None,
        extra_params: Dict[str, Any] = None,
    ):
        """Init class."""
        super().__init__(package_name, project_path, env, extra_params)
        self.hooks = DataValidationHook()
        self._spark_session = None
        self._experiment_tracker = None
        self._setup_env_variables()
        self._init_common_env_vars()
        self.init_spark_session()
Can you guide me where I can look or modify in order to check why hooks are not running
j
hi @Vandana Malik! to declare a hook, you need to decorate it with
@hook_impl
. in addition, I you'd need to define your own standalone class rather than subclassing the
KedroContext
. could you verify if any of the examples here https://docs.kedro.org/en/0.17.3/07_extend_kedro/02_hooks.html helps?