Hi, I am working on Kedro hooks. I'm using the ked...
# questions
d
Hi, I am working on Kedro hooks. I'm using the kedro space-flights tutorial pipeline and I had a question why the hooks are not running. My end goal is to create a DataValidationHook where it uses Evidently AI to check the integrity of the datacatalogs before the node runs and after the node runs. I am first testing the hook connection, but it seems like it is not working. Here is my code. https://kedro-org.slack.com/files/U06G775TGPN/F06HAET2AMV/hooks.py https://kedro-org.slack.com/files/U06G775TGPN/F06HAEZJEFR/settings.py The output does not show the list of catalog. Are the hooks running? How can I achieve my goal?
👀 1
n
Can you try with print instead of logger?
plusone 1
a
Seconded, a print statement would help. I'm curious about your logging calls - why not use
Copy code
logging.getLogger(__name__).info("List of catalog: {}".format(catalog.list()))
in your hook, instead of declaring a logger property and using
Copy code
<http://self._logger.info|self._logger.info>("List of catalog: {}".format(catalog.list()))
Additionally, what version of Kedro are you using, and have you made any customisations to your project logging setup?
n
The reason I suggest printing first is because I ran into similar issues before and it's because of the logging settings, just want to confirm.