AI / Apache Burr Interview questions
Describe what Hooks do in Burr?
Hooks are lifecycle adapters — a concept borrowed from Hamilton — that let you plug custom logic into specific points of an action’s execution without touching your actions themselves. Typical uses include logging every step to an external observability tool, adding a rendering delay, or synchronizing state to a system outside Burr.
You implement a hook by subclassing one or more of the available lifecycle classes (e.g. PreRunStepHook, PostRunStepHook) and register it with with_hooks(...) on the ApplicationBuilder. Hooks come in synchronous and asynchronous flavors; sync hooks fire for both sync and async run methods, while async-only hooks fire solely under astep/aiterate/arun.
More Related questions...