Skip to content

Instantly share code, notes, and snippets.

View mzjp2's full-sized avatar
:octocat:
Working

Zain Patel mzjp2

:octocat:
Working
  • Maven Securities
  • London, United Kingdom
View GitHub Profile
@mzjp2
mzjp2 / skip_hook.py
Created October 1, 2020 11:26
A prototype of a hook that will skip a node run based on the last modified time of input and output datasets
import logging
from kedro.framework.hooks import hook_impl
from kedro.io import MemoryDataSet
from kedro.io.core import get_filepath_str
class SkipHook:
def __init__(self):
self.logger = logging.getLogger(__name__)
@mzjp2
mzjp2 / kedro_post_mortem.py
Last active June 20, 2020 12:05
Kedro hook for post mortem debugging sesions
class PDBDebugHook:
"""A hook class for creating a post mortem debugging with the PDB debugger
whenever an error is triggered within a node. The local scope from when the
exception occured is available within this debugging session.
"""
@hook_impl
def on_node_error(self):
_, _, traceback_object = sys.exc_info()